From Sagar Gulati, 3 Years ago, written in PHP.
Embed
  1. <?php
  2. $domainUrl = "https://myurl.com";
  3. $list = array(
  4.   array(
  5.     "name" => "Item 1",
  6.     "desc"  => "Item 1 description",
  7.     "image" => "item1.jpg",
  8.   ),
  9.   array(
  10.     "name" => "Item 2",
  11.     "desc"  => "Item 2 description",
  12.     "image" => "item2.jpg",
  13.   ),
  14. );
  15.  
  16. $num1  = array_rand($list);
  17. $title = "You're like ". $list[$num1]['name'];
  18. $desc  = $list[$num1]['desc'];
  19. $image = $list[$num1]['image'];
  20.  
  21. $url   = "https://". $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
  22.  
  23. $urls = array(
  24. "https://www.cloud.com/my-clour-article-1",
  25. "https://www.cloud.com/my-clour-article-2",
  26. "https://www.cloud.com/my-clour-article-3",
  27. );
  28. $num2 = array_rand($urls);
  29.  
  30. $goTo = $urls[$num2];
  31. header("refresh: 1;url=$goTo ");
  32. ?>
  33. <!--Characters Count: <?php echo count($list); ?>-->
  34. <!Doctype html>
  35. <html>
  36.   <head>
  37.     <meta charset="utf-8">
  38.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  39.     <meta name="robots" content="noindex, nofollow">
  40.    
  41.     <title> <?php echo $title; ?> </title>
  42.  
  43.     <meta property="og:locale" content="en_US">
  44.     <meta property="og:type" content="article">
  45.     <meta property="og:title" content="<?php echo $title; ?>">
  46.     <meta property="og:description" content="<?php echo $desc; ?>">
  47.     <meta property="og:image" content="<?php echo $domainUrl; ?>/images/<?php echo $image; ?>">
  48.     <meta property="og:url" content="<?php echo $url; ?>">
  49.     <meta property="og:site_name" content="My Super Site">
  50.     <meta property="article:section" content="Glamor">
  51.     <meta property="article:author" content="https://www.facebook.com/Facebook" />
  52.     <meta property="fb:app_id" content="2328908412"/>
  53.   </head>
  54. <body>
  55.   <div style="width: 100%; text-align: center;">
  56.     <h1> <?php echo $title; ?> </h1>
  57.     <a href="<?php echo $goTo; ?>"><img src="<?php echo $domainUrl; ?>/images/<?php echo $image; ?>" style="width: 600px;"></a>
  58.     <h2> <?php echo $desc; ?> </h2>
  59.   </div>
  60. </body>
  61.  
  62. </html>
  63.