Blame view
src/assets/meta.php
3.53 KB
8a0dd59d9
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
<!doctype html> <html lang="en"> <head> <?php $id = substr($_SERVER[REQUEST_URI], strrpos($_SERVER[REQUEST_URI], '/') + 1); #$response = file_get_contents('https://api.gigsfor.me/api/Profiles/'.$id); # $response = json_decode($response); $actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; #$title = $response->firstName.' '.$response->lastName; #$description = $response->oneLineBio; #$image = $response->profileImage; if ($id === "communication-for-the-gig-economy-101"){ $title = 'Communication 101'; $image = 'https://cdn.filestackcontent.com/E24ABqbjQyeNfCuOGTum'; $description = 'Learn the basics of communication and how you can improve your communication to get more projects in this free course'; } elseif($id === "gig-economy-101"){ $title = 'Gig Economy 101'; $image = 'https://cdn.filestackcontent.com/Oo6ZEdEShqpObPCrFW6b'; $description = 'Learn all about the white collar gig work and how can can kick-start your career as a freelancer with this free course'; } elseif($id === "content-writing-101"){ $title = 'Content Writing 101'; $image = 'https://cdn.filestackcontent.com/WVo8wGv5QZOMHdAyjDUn'; $description = 'Discover the basics of content writing, the platforms for content writing gigs, and the tools you can use in this free course.'; } elseif($id === "gigs" || $id === "courses" || $id === "contact" || $id === "about"){ $title = 'Gigsforme-Start, manage and grow your freelance career'; $image = 'https://cdn.filestackcontent.com/WVo8wGv5QZOMHdAyjDUn'; $description = 'Use our AI based tools to find the right gigs, courses and career paths, suited for you to launch a successful freelance career.'; } else { $response = file_get_contents('https://api.gigsfor.me/api/Profiles/'.$id); $response = json_decode($response); if(!$response->hashTag){ $response->hashTag = '#gigworker'; } $title = $response->firstName.' '.$response->lastName. ' | '.$response->skills[0]. ' | '.$response->hashTag; $description = 'View '.$response->firstName.' '.$response->lastName.'\'s profile on gigsforme, the online platform for freelancers to start, manage and grow their career. Discover Annie Rose Parina’sphilosophy and superpowers for the gig economy'; $image = $response->profileImage; } ?> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta property="og:image" content="<?php echo $image; ?>"> <meta name="description" content="<?php echo $description; ?>"/> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" /> <meta property="og:title" content="<?php echo $title; ?>" /> <meta property="og:description" content="<?php echo $description; ?>" /> <meta property="og:url" content="<?php echo $actual_link; ?>" /> <meta property="og:site_name" content="GigsForMe" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:description" content="<?php echo $description; ?>" /> <meta name="twitter:title" content="<?php echo $title; ?>" /> <!-- Bootstrap CSS --> <title><?php echo $title; ?></title> </head> <body> <?php $id = substr($_SERVER[REQUEST_URI], strrpos($_SERVER[REQUEST_URI], '/') + 1); echo '<br>'; echo '<br>'; echo '<br>'; echo $id; ?> <h1><?php echo $response->firstName; ?> <?php echo $response->lastName; ?></h1> </body> </html> |