morze
Постоялец
- Регистрация
- 9 Окт 2006
- Сообщения
- 74
- Реакции
- 51
*** скрытое содержание ***
Для просмотра скрытого содержимого вы должны войти или зарегистрироваться.
Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
*** скрытое содержание ***
всё верно.find.phpЗаменил эти строки в find.php, всёравно не пашет. Может не там меняю?
<?
print "Парсим гугл<br>";
if ($filetext<>"")
{
print "Взял текст с файла<br>";
@copy($filetext, "out.txt");
}
else {
ob_implicit_flush();
print "Начал поиск текста<br>";
$gl="";
while (!eregi($la, $gl)||!eregi("google", $gl)||!eregi("result", $gl))
{
$gl=google($la);
}
preg_match_all('!<td class=j><font size=-1>(.*?)<span class=a>!si',$gl,$ok);
while (strlen ($ok[0][1])<5){
$uu++;
$ok="";
$gl=google($la);
preg_match_all('!<td class=j><font size=-1>(.*?)<span class=a>!si',$gl,$ok);
print ".";
if ($uu>100){print "Произошла ошибка!";exit;}
}
$i=0;
while ($i<100){
$data.=$ok[0][$i];
$i++;}
$data = str_replace("<br>", "", $data);
$data = str_replace("</br>", "", $data);
$data = str_replace("<b>", "", $data);
$data = str_replace("</b>", "", $data);
$data = str_replace('<td class=j><font size=-1>', "", $data);
$data = str_replace("<font", "", $data);
$data = str_replace($la, "", $data);
$i010=0;
while ($i010<500){
$data = str_replace("$i010k", "", $data);
$i010++;}
echo '<br><font color=red>'.$data.'</font><br>';
//print $data;
@unlink (out.txt);
$search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript
"'<[\/\!]*?[^<>]*?>'si", // strip out html tags
"'([\r\n])[\s]+'", // strip out white space
"'&(quot|#34|#034|#x22);'i", // replace html entities
"'&(amp|#38|#038|#x26);'i", // added hexadecimal values
"'&(lt|#60|#060|#x3c);'i",
"'&(gt|#62|#062|#x3e);'i",
"'&(nbsp|#160|#xa0);'i",
"'&(iexcl|#161);'i",
"'&(cent|#162);'i",
"'&(pound|#163);'i",
"'&(copy|#169);'i",
"'&(reg|#174);'i",
"'&(deg|#176);'i",
"'&(#39|#039|#x27);'",
"'&(euro|#8364);'i", // europe
"'&a(uml|UML);'", // german
"'&o(uml|UML);'",
"'&u(uml|UML);'",
"'&A(uml|UML);'",
"'&O(uml|UML);'",
"'&U(uml|UML);'",
"'ß'i",
);
$replace = array( "",
"",
"\\1",
"\"",
"&",
"<",
">",
" ",
chr(161),
chr(162),
chr(163),
chr(169),
chr(174),
chr(176),
chr(39),
chr(128),
"д",
"ц",
"ь",
"Д",
"Ц",
"Ь",
"Я",
);
$src=$data;
$src = preg_replace("/<script.+?<\/script>/ism"," ",$src);
$src = ereg_replace("<[^>]+>"," ",$src);
$src = str_replace(array('<','>','-','_','+','©','|',':',';',' '),' ',$src);
$src = preg_replace("/&(.*);/ism"," ",$src);
$src = ereg_replace("[[[:alpha:]]+.?//]?[^<>[:space:]]+[[:alnum:]/]"," ",$src);
$src=str_replace("(с)", "", $src);
$src=str_replace("--", "", $src);
$src=str_replace("%", "", $src);
$src=str_replace("^", "", $src);
$src=str_replace("@", "", $src);
$src=str_replace("'", "", $src);
$src=str_replace("<", "", $src);
$src=str_replace(">", "", $src);
$src=str_replace("#", "", $src);
$data= preg_replace($search,$replace,$src);
$data.="JHFSNSHTGCNA";
$file_out=fopen("out.txt","a");
fwrite($file_out,$data);
fclose($file_out);
print "Текст найден!<br>";
}
procent($la);
include ("mark.php");
?>
всё верно.find.php
Код:<? print "Парсим гугл<br>"; if ($filetext<>"") { print "Взял текст с файла<br>"; @copy($filetext, "out.txt"); } else { ob_implicit_flush(); print "Начал поиск текста<br>"; $gl=""; while (!eregi($la, $gl)||!eregi("google", $gl)||!eregi("result", $gl)) { $gl=google($la); } preg_match_all('!<td class=j><font size=-1>(.*?)<span class=a>!si',$gl,$ok); while (strlen ($ok[0][1])<5){ $uu++; $ok=""; $gl=google($la); preg_match_all('!<td class=j><font size=-1>(.*?)<span class=a>!si',$gl,$ok); print "."; if ($uu>100){print "Произошла ошибка!";exit;} } $i=0; while ($i<100){ $data.=$ok[0][$i]; $i++;} $data = str_replace("<br>", "", $data); $data = str_replace("</br>", "", $data); $data = str_replace("<b>", "", $data); $data = str_replace("</b>", "", $data); $data = str_replace('<td class=j><font size=-1>', "", $data); $data = str_replace("<font", "", $data); $data = str_replace($la, "", $data); $i010=0; while ($i010<500){ $data = str_replace("$i010k", "", $data); $i010++;} echo '<br><font color=red>'.$data.'</font><br>'; //print $data; @unlink (out.txt); $search = array("'<script[^>]*?>.*?</script>'si", // strip out javascript "'<[\/\!]*?[^<>]*?>'si", // strip out html tags "'([\r\n])[\s]+'", // strip out white space "'&(quot|#34|#034|#x22);'i", // replace html entities "'&(amp|#38|#038|#x26);'i", // added hexadecimal values "'&(lt|#60|#060|#x3c);'i", "'&(gt|#62|#062|#x3e);'i", "'&(nbsp|#160|#xa0);'i", "'&(iexcl|#161);'i", "'&(cent|#162);'i", "'&(pound|#163);'i", "'&(copy|#169);'i", "'&(reg|#174);'i", "'&(deg|#176);'i", "'&(#39|#039|#x27);'", "'&(euro|#8364);'i", // europe "'&a(uml|UML);'", // german "'&o(uml|UML);'", "'&u(uml|UML);'", "'&A(uml|UML);'", "'&O(uml|UML);'", "'&U(uml|UML);'", "'ß'i", ); $replace = array( "", "", "\\1", "\"", "&", "<", ">", " ", chr(161), chr(162), chr(163), chr(169), chr(174), chr(176), chr(39), chr(128), "д", "ц", "ь", "Д", "Ц", "Ь", "Я", ); $src=$data; $src = preg_replace("/<script.+?<\/script>/ism"," ",$src); $src = ereg_replace("<[^>]+>"," ",$src); $src = str_replace(array('<','>','-','_','+','©','|',':',';',' '),' ',$src); $src = preg_replace("/&(.*);/ism"," ",$src); $src = ereg_replace("[[[:alpha:]]+.?//]?[^<>[:space:]]+[[:alnum:]/]"," ",$src); $src=str_replace("(с)", "", $src); $src=str_replace("--", "", $src); $src=str_replace("%", "", $src); $src=str_replace("^", "", $src); $src=str_replace("@", "", $src); $src=str_replace("'", "", $src); $src=str_replace("<", "", $src); $src=str_replace(">", "", $src); $src=str_replace("#", "", $src); $data= preg_replace($search,$replace,$src); $data.="JHFSNSHTGCNA"; $file_out=fopen("out.txt","a"); fwrite($file_out,$data); fclose($file_out); print "Текст найден!<br>"; } procent($la); include ("mark.php"); ?>
function google ($key)
{
$key = str_replace (' ', '+', $key);
$proxy = '';
$proxy = file ('prox.txt');
$cnt = count ($proxy);
srand ((double)microtime () * 1000000);
$pr = $proxy[rand (0, $cnt)];
$pr = trim ($pr);
$cUrl = curl_init ();
curl_setopt ($cUrl, CURLOPT_URL, '' . 'http://www.google.com/search?hl=en&q=' . $key . '&num=100');
curl_setopt ($cUrl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($cUrl, CURLOPT_TIMEOUT, '7');
$pageContent = trim (curl_exec ($cUrl));
curl_close ($cUrl);
if (eregi ('result', $pageContent))
{
return $pageContent;
break;
}
else
{
print '' . 'используем прокси: ' . $pr . '<br>';
$cUrl = curl_init ();
curl_setopt ($cUrl, CURLOPT_URL, '' . 'http://www.google.com/search?hl=en&q=' . $key . '&num=100');
curl_setopt ($cUrl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($cUrl, CURLOPT_TIMEOUT, '7');
curl_setopt ($cUrl, CURLOPT_PROXY, $pr);
$pageContent = trim (curl_exec ($cUrl));
curl_close ($cUrl);
return $pageContent;
}
}
в твоём старом find.php, она должна быть.
добавь её в начало файла
FTP не хочет почему-то искать картинки и останавливает процесс на действии:
---------------------------------------------------------
Начал искать картинки в гугле
Fatal error: Call to undefined function: curl_multi_init() in /usr/local/psa/home/vhosts/domain.com/httpdocs/jonn22/ftp/img.php on line 37
В чём может быть дело?
ставь курлFatal error: Call to undefined function: curl_multi_init()
Fatal error: Call to undefined function: curl_multi_init() in /usr/local/psa/home/vhosts/domain.com/httpdocs/jonn22/ftp/img.php on line 37
В чём может быть дело?