Вы не зашли.
Главная » PHP » Грабер
#1. Vampisja Off (0)
Участник
2010.01.04 17:05
Здарова. Немогу вирезать с грабера текст с ссылкой вот http://interclub.net.ru/down/user/images/index.php?wml=1
Добавлено спустя   1 минуту  38 секунд:
Нужна скрить этот текст "Версия: wap 1 | wap 2"
Код:
span style="color: #0000BB"><?php//////////// Граббер картинок wapos.ru/im////// Автор: Вампир///// http://interclub.net.ru//////list($msec, $sec) = explode(chr(32), microtime());$headtime = $sec + $msec;echo "<link rel=\"shortcut icon\"href=\"$icon\"/><title>Загрузки на interclub.net.ru</title>\n";echo "<style type=\"text/css\">body { font-weight: normal; font-size: normal; font-family: #000000; color: #ffffff; background-color: #000000 }a:link,a:active,a:visited { text-decoration: underline; color : #00ff00 }div { margin: 1px 0px 1px 0px; padding: 4px 4px 4px 4px }div.form { background-color: #006600 }</style></head><body><div style=\"text-align: left\">";echo "<div class=\"form\">\n";echo "<center>\n";echo "<b>Картинки</b>\n";echo "</center>\n";echo "</form></div>\n";$host = "wapos.ru";$path = "/themes/?$QUERY_STRING";$fp = fsockopen($host,80,$errno,$errstr,30);if(!$fp) echo"$errstr ($errno)<br />\n";else{$headers = "GET $path HTTP/1.0\r\n";$headers .= "Host: $host\r\n";$headers .= "Accept: *\r\n";$headers .= "Accept-Charset: UTF-8\r\n";$headers .= "Accept-Charset: *\r\n";$headers .= "Accept-Encoding: deflate\r\n";$headers .= "Accept-Language: ru\r\n";$headers .= "Referer: wepus.ru\r\n";$headers .= "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01\r\n\r\n";fwrite($fp,$headers);while($file != "\r\n") $file = fgets($fp,128);$file = "";while(!feof($fp)) $file .= fgets($fp,4096);fclose($fp);}$file = preg_replace('/<a href="http:\/\/wap.1124.ru\/(.*?)<\/a>/si','',$file);$file = preg_replace('/<a href="http:\/\/1124.ru\/(.*?)<\/a>/si','',$file);$file = preg_replace('/<a href="http:\/\/demo.1124.ru\/(.*?)<\/a>/si','',$file);$file = preg_replace('/<a href="http:\/\/wap2.1124.ru\/(.*?)<\/a>/si','',$file);$file = preg_replace('/(.*?)<card title="Картинки">/si','',$file);$file = str_replace('<br/>---<br/>','',$file);$file = preg_replace('/<\/small><\/p>(.*?)<\/wml>/si','',$file);$file = str_replace('[<a href="http://wapos.ru"><< На главную</a>]','',$file);$file = str_replace('<b>Wapos.ru (c) 2010</b>','',$file);$file = preg_replace('/<p><small>Версия: wap 1 | wap 2<\/a>/si','',$file);$file = str_replace('<small>','',$file);$file = str_replace('</small>','',$file);$file = str_replace('<p>','',$file);$file = preg_replace('/<a href="http:\/\/spin2win.wapos.ru(.*?)<\/a>/si','',$file);$file = str_replace('</p>','',$file);$file = str_replace('Выберите режим:<br/>','',$file);$file = str_replace('imgs/folder.gif','http://wapos.ru/im/imgs/folder.gif',$file);$file = str_replace('[<a href="index.php?wml=1">Выбрать режим</a>]<br/>','',$file);$file = str_replace('[<a href="index.php?wml=0">Выбрать режим</a>]<br/>','',$file);$file = str_replace('---','',$file);echo $file;echo "<div class=\"form\">\n";echo "<center>\n";echo "<b>Разное</b>\n";echo "</center>\n";echo "</form></div>\n";include'onlines.php';echo '<a href="http://interclub.net.ru/down/images">К разделам</a><br/>';echo '<a href="http://interclub.net.ru">На главную</a><br/>';include'../../vampir.php';include'../../topwml.php';list($msec, $sec) = explode(chr(32), microtime());echo "<small>[".round(($sec +$msec) - $headtime, 5)."]</small><br/>\n";?>
Отредактировано Gemorroj (2010.01.04 21:09)
#2. Gemorroj Off (107)
Administrator
2010.01.04 21:09
str_replace
Добавлено спустя    29 секунд:
и в следующий раз код пиши в теме, а не давай ссылок.
#3. Vampisja Off (0)
Участник
2010.01.05 03:03
Спасибо
#4. TLENS Off (14)
Moderator
2010.01.07 00:12
Учи регулярки все ето убралось бы одной двУмя функциями smile
#5. DarkDaNTe Off (11)
Участник
2010.01.07 14:02
Код:
$file = str_replace('imgs/folder.gif','http://wapos.ru/im/imgs/folder.gif',$file);
Не проще скачать эту картинку?)
Страниц: 1
Главная
WEB
PunBB Mod v0.6.2
0.012 s