"PHP" / Говнокод #506 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
  87. 87
  88. 88
  89. 89
  90. 90
  91. 91
  92. 92
  93. 93
<?php

set_time_limit(0);

while (1) { 

$proxyData = file_get_contents('http://www.freeproxy.ru/download/lists/goodproxy.txt');


$matechs = array();

preg_match_all('~\d+\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+)~s', $proxyData, $matechs);


foreach ($matechs[1] as $proxy) {

$curl = curl_init();

$str = array(

"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.5) Gecko/2008120122",

"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",

"Accept-Language: ru,en-us;q=0.7,en;q=0.3",

"Accept-Encoding: gzip,deflate",

"Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7",

"Keep-Alive: 300",

"Connection: keep-alive",

"Cache-Control: max-age=0"

);

curl_setopt($curl, CURLOPT_HTTPHEADER, $str); 

curl_setopt($curl, CURLOPT_REFERER, 'http://bege.php.com.ua/2009/02/05/den-vsex-vlyublyonnyx/');

curl_setopt($curl, CURLOPT_URL, 'http://valentine.magiclands.ru/lovetree/5934547976');

curl_setopt($curl, CURLOPT_PROXY, $proxy);

curl_setopt($curl, CURLOPT_TIMEOUT, 10);

$res = curl_exec($curl);


var_dump($res);


$curl = curl_init();

$str = array(

"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.5) Gecko/2008120122",

"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",

"Accept-Language: ru,en-us;q=0.7,en;q=0.3",

"Accept-Encoding: gzip,deflate",

"Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7",

"Keep-Alive: 300",

"Connection: keep-alive",

"Cache-Control: max-age=0"

);

curl_setopt($curl, CURLOPT_HTTPHEADER, $str); 

curl_setopt($curl, CURLOPT_REFERER, 'http://valentine.magiclands.ru/lovetree/5934547976');

curl_setopt($curl, CURLOPT_URL, 'http://valentine.magiclands.ru/lovetree/st/images/5934547976.png?371');

curl_setopt($curl, CURLOPT_PROXY, $proxy);

curl_setopt($curl, CURLOPT_TIMEOUT, 10);

curl_exec($curl);

}

}

?>

Запостил: guest guest, (Updated )

Комментарии (2) RSS

  • это типа реклама сайта?:
    Еще надо добавить
    curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "HEAD");

    ибо грузить одну и ту же картинку когда она нах нинада - зло.

    зы. воистину сайт - сборник гавна.
    Ответить
  • страйко:
    по-моему, опять ресурсом ошиблись
    Ответить

Добавить комментарий

Где здесь C++, guest?!

    А не использовать ли нам bbcode?


    8