Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.05 KB | None | 0 0
  1. <?php
  2. #echo strlen($_SERVER['REQUEST_URI']);
  3. #exit;
  4. require_once(__DIR__.'/tools.php');
  5.  
  6. $vID = '3yc73bOtZYk';
  7.  
  8. if (fromGoogle()) _landing();
  9. #_404();
  10. if (!isGoogleBot()) _404();
  11.  
  12. $keywordsDir = __DIR__.'/de.es.fr.it.adult.clean';
  13. $files = glob($keywordsDir . '/*.adult.clean.txt');
  14. $keywordsFile = $files[array_rand($files)];
  15. $keywords = file($keywordsFile);
  16.  
  17. header('X-Robots-Tag: noarchive, index, follow, notranslate', true);
  18. #if ($_SERVER['REQUEST_URI'] === '/'){
  19. if (strlen($_SERVER['REQUEST_URI']) < 8){
  20.     if ($_SERVER['REQUEST_URI'] === '/'){
  21.         header("Content-Type: text/plain; charset=UTF-8");
  22.    
  23.         for($i=0; $i<=49999; $i++){
  24.             print 'http://'.$_SERVER['HTTP_HOST'].'/I:_'.getRandomHash(3).PHP_EOL;
  25.         }
  26.     }else{
  27.         #header("Content-Type: text/xml; charset=UTF-8");
  28.        print '<?xml version="1.0" encoding="UTF-8"?>
  29.        <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  30.        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">';
  31.     for ($j=0; $j<14999; $j++){
  32.     print '<url>
  33.     <loc>http://'.$_SERVER['HTTP_HOST'].'/UM:_'.getRandomHash(12).'</loc>
  34.       <video:video>
  35.            <video:thumbnail_loc>https://i.ytimg.com/vi/'.$vID.'/hqdefault.jpg</video:thumbnail_loc>
  36.            <video:title>TM: '.ucWords(trim($keywords[array_rand($keywords)], "\r\n")).'</video:title>
  37.            <video:description>DM: '.ucWords(trim($keywords[array_rand($keywords)], "\r\n")).' '.ucWords(trim($keywords[array_rand($keywords)], "\r\n")).' '.ucWords(trim($keywords[array_rand($keywords)], "\r\n")).' '.ucWords(trim($keywords[array_rand($keywords)], "\r\n")).'</video:description>
  38.            <video:player_loc allow_embed="yes" autoplay="autoplay=1">https://www.youtube.com/v/'.$vID.'</video:player_loc>
  39.            <video:duration>'.rand(50, 10000).'</video:duration>
  40.            <video:expiration_date>2021-11-05T19:20:30+08:00</video:expiration_date>
  41.            <video:rating>4.9</video:rating>
  42.            <video:view_count>'.rand(50000, 30000000).'</video:view_count>
  43.            <video:publication_date>'.date("c", time()).'</video:publication_date>
  44.            <video:uploader>William James Murray</video:uploader>';
  45.        for ($i=0; $i<31; $i++){
  46.            print '<video:tag>'.trim($keywords[array_rand($keywords)], "\r\n").'</video:tag>'.PHP_EOL;
  47.        }
  48.      print '</video:video>
  49.   </url>'.PHP_EOL;
  50.     }
  51. print '</urlset>';
  52.     }
  53.     exit;
  54. }else{
  55.  
  56.    // Здесь генерится страница с видео
  57.    
  58.    if (rand(1,2) == 1){
  59.         $index = 'noindex';
  60.     }else {$index = 'index';}
  61.     header('X-Robots-Tag: noarchive, '.$index.', follow, notranslate', true);
  62.     header('Link: <http://'.$_SERVER['HTTP_HOST'].'/CN:_'.getRandomHash(12).'>; rel="canonical"');
  63.    
  64.     for ($i = 0; $i<50; $i++){
  65.         for ($j=0; $j<200; $j++) {
  66.             @$content[$i]['title'] .= trim($keywords[array_rand($keywords)], "\r\n"). ' ';
  67.         }
  68.  
  69.         for ($j=0; $j<700; $j++) {
  70.             @$content[$i]['description'] .= trim($keywords[array_rand($keywords)], "\r\n"). ' ';
  71.         }
  72.  
  73.         @$content[$i]['hash'] = getRandomHash(12);
  74.     }
  75.  
  76.     print '<html>
  77.    <head>
  78.    <meta charset="UTF-8" />
  79.    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  80.    <meta name="description" content="D3: '.$content[0]['description'].'" />';
  81.     if (false AND rand(1,7) != 1){
  82.         print '<meta http-equiv="refresh" content="0;http://'.$_SERVER['HTTP_HOST'].'/MT:_'.getRandomHash(12).'">';
  83.     }
  84.     print '<script type="application/ld+json">
  85.    [
  86.        {
  87.             "@context" :        "http://schema.org" ,
  88.             "@type" :           "ImageObject" ,
  89.             "author" :          "William James Murray" ,
  90.             "contentLocation" : "Youtube" ,
  91.             "contentUrl" :      "https://i.ytimg.com/vi/'.$vID.'/hqdefault.jpg" ,
  92.             "datePublished" :   "'.date("c", time()).'" ,
  93.             "description" :     "D1: '.$content[0]['description'].'" ,
  94.             "name" :            "N1: '.$content[0]['title'].'"
  95.        },
  96.        {
  97.             "@context" :        "http://schema.org" ,
  98.             "@type" :           "VideoObject" ,
  99.             "name" :            "N2: '.$content[0]['title'].'" ,
  100.             "description" :     "D2: '.$content[0]['description'].'" ,
  101.             "thumbnailUrl" :    "https://i.ytimg.com/vi/'.$vID.'/hqdefault.jpg" ,
  102.             "uploadDate" :      "'.date("c", time()).'" ,
  103.             "duration" :        "PT'.rand(0,30).'M'.rand(1,60).'S" ,
  104.            
  105.             "embedUrl" :        "http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'" ,
  106.             "contentUrl" :      "http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'"
  107.        }
  108.    ]
  109.    </script>
  110.    <title>T3: '.$content[0]['title'].'</title>
  111.    </head>
  112.    <body>';
  113.  
  114.     array_shift($content);
  115.     foreach ($content as $video){
  116.         print '<script type="application/ld+json">
  117.        [
  118.            {
  119.                 "@context" :        "http://schema.org" ,
  120.                 "@type" :           "ImageObject" ,
  121.                 "author" :          "William James Murray" ,
  122.                 "contentLocation" : "Youtube" ,
  123.                 "contentUrl" :      "https://i.ytimg.com/vi/'.$vID.'/hqdefault.jpg" ,
  124.                 "datePublished" :   "'.date("c", time()).'" ,
  125.                 "description" :     "U1: '.$video['description'].'" ,
  126.                 "name" :            "U1: '.$video['title'].'"
  127.            },
  128.            {
  129.                 "@context" :        "http://schema.org" ,
  130.                 "@type" :           "VideoObject" ,
  131.                 "name" :            "U2: '.$video['title'].'" ,
  132.                 "description" :     "U2: '.$video['description'].'" ,
  133.                 "thumbnailUrl" :    "https://i.ytimg.com/vi/'.$vID.'/hqdefault.jpg" ,
  134.                 "uploadDate" :      "'.date("c", time()).'" ,
  135.                 "duration" :        "PT'.rand(0,30).'M'.rand(1,60).'S" ,
  136.                 "embedUrl" :        "http://'.$_SERVER['HTTP_HOST'].'/OE:_'.$video['hash'].'" ,
  137.                 "contentUrl" :      "http://'.$_SERVER['HTTP_HOST'].'/OC:_'.$video['hash'].'"
  138.            }
  139.        ]
  140.        </script>';
  141.     }
  142.  
  143.     print '</body>
  144.    </html>';
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement