ANTICHAT — форум по информационной безопасности, OSINT и технологиям
ANTICHAT — русскоязычное сообщество по безопасности, OSINT и программированию.
Форум ранее работал на доменах antichat.ru, antichat.com и antichat.club,
и теперь снова доступен на новом адресе —
forum.antichat.xyz.
Форум восстановлен и продолжает развитие: доступны архивные темы, добавляются новые обсуждения и материалы.
⚠️ Старые аккаунты восстановить невозможно — необходимо зарегистрироваться заново.

21.02.2010, 01:21
|
|
Познающий
Регистрация: 24.11.2009
Сообщений: 55
Провел на форуме: 659042
Репутация:
73
|
|
Сообщение от ReduKToR
Скиньте допотопный чекер прокси.Без всяких наворотов.чисто сам класс
Вот держи,старенький,но зато рабочий)))
Код:
<? /************************************************** ************** * * * * * This will perform a basic connectivity and anonymity test * * * * Simply upload to a php enabled webserver and change the * * configurable parameters below if you so desire * * * * 2005-11-11 v0.1 - Compatible with Charon v0.5.3.5 * ************************************************** **************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Online proxy tester</title></head> <body bgcolor="black" text="white"> <?php // Ensure that the timeouts from fsockopen don't get reported as errors (possible, depends on the php server config) error_reporting(0); // Limit the amount of proxies that can be tested at any one time $maximum_proxies_to_test = 5; // Enter a password (if required) to protect the page $password = ''; // Actual proxyjudge part of the page function return_env_variables() { echo '<pre>'."\n"; foreach ($_SERVER as $header => $value ) { if ((strpos($header , 'REMOTE')!== false || strpos($header , 'HTTP')!== false || strpos($header , 'REQUEST')!== false) && ( strpos($header , 'HTTP_HOST') !== 0)) { echo $header.' = '.$value."\n"; } } echo '</pre>'; } // Function to go away and get the page (calls through the proxy back to itself) function get_judge_page($proxy) { // Depending on the server environment, this timeout setting may not be available. $timeout = 15; $proxy_cont = ''; list($proxy_host, $proxy_port) = explode(":", $proxy); $proxy_fp = fsockopen($proxy_host, $proxy_port, $errornumber, $errorstring, $timeout); if ($proxy_fp) { stream_set_timeout($proxy_fp, $timeout); fputs($proxy_fp, "GET " . $_SERVER['SCRIPT_NAME'] . "?test HTTP/1.0\r\nHost: " . $_SERVER['SERVER_NAME'] . "\r\n\r\n"); while(!feof($proxy_fp)) { $proxy_cont .= fread($proxy_fp,4096); } fclose($proxy_fp); $proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n")+4); } return $proxy_cont; } // Check for the control string to see if it's a valid fetch of the judge function check_valid_judge_response($page) { if(strlen($page) < 5) return false; return strpos($page, 'REMOTE_ADDR') !== false; } // Check for the IP addresses function check_anonymity($page) { if(strpos($page, $_SERVER['LOCAL_ADDR']) !== false) return false; return true; } // Takes and tests a proxy // 0 - Bad proxy // 1 - Good (non anon) proxy // 2 - Good (anonymous) proxy function test_proxy($proxy) { $page = get_judge_page($proxy); if(!check_valid_judge_response($page)) return 0; if(!check_anonymity($page)) return 1; return 2; } ////////// Main Page //////////// // If this is a judge request, just return the environmental variables if(getenv('QUERY_STRING') == "test") { return_env_variables(); } // Else check whether we have been passed a list of proxies to test or not // Should really use $_POST but it's been left as $HTTP_POST_VARS for older versions of php (3.x) elseif( (isset($HTTP_POST_VARS['action']) && $HTTP_POST_VARS['action'] === 'fred') && (isset($HTTP_POST_VARS['proxies']) && $HTTP_POST_VARS['proxies'] != '') && ( (strlen($password) == 0) || (isset($HTTP_POST_VARS['password']) && $HTTP_POST_VARS['password'] === $password) )) { $proxies = explode("\n", str_replace("\r", "", $HTTP_POST_VARS['proxies']), $maximum_proxies_to_test + 1); // Set the overall time limit for the page execution to 10 mins set_time_limit(600); // Set up some arrays to hold the results $anon_proxies = array(); $nonanon_proxies = array(); $bad_proxies = array(); // Loop through and test the proxies for($thisproxy = 0; $thisproxy < ($maximum_proxies_to_test > count($proxies) ? count($proxies) : $maximum_proxies_to_test); $thisproxy += 1) { echo 'Testing ' . $proxies[$thisproxy] . ' .....'; flush(); switch(test_proxy($proxies[$thisproxy])) { case 2: echo '.. Anon<br>' . "\n"; $anon_proxies[count($anon_proxies)] = $proxies[$thisproxy]; break; case 1: echo '.. Non anon<br>' . "\n"; $nonanon_proxies[count($nonanon_proxies)] = $proxies[$thisproxy]; break; case 0: echo '.. Dead<br>' . "\n"; $bad_proxies[count($bad_proxies)] = $proxies[$thisproxy]; break; } } echo '<pre>'; echo '<br><b>Anonymous proxies</b>' . "\n"; for($thisproxy = 0; $thisproxy < count($anon_proxies); $thisproxy += 1) echo $anon_proxies[$thisproxy] . "\n"; echo '<br><b>Non-anonymous proxies</b>' . "\n"; for($thisproxy = 0; $thisproxy < count($nonanon_proxies); $thisproxy += 1) echo $nonanon_proxies[$thisproxy] . "\n"; echo '<br><b>Dead proxies</b>' . "\n"; for($thisproxy = 0; $thisproxy < count($bad_proxies); $thisproxy += 1) echo $bad_proxies[$thisproxy] . "\n"; echo '</pre>'; } // Just a blank call of the page - show the form for the user to fill in else { echo '<h2>Online Proxy checker</h2>' . "\n"; echo '<h4>(http://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . ')</h4>' . "\n"; echo 'Enter up to a maximum of ' . $maximum_proxies_to_test . ' prox' . ($maximum_proxies_to_test == 1 ? 'y' : 'ies') . ' to test' . "\n"; echo '<form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '">' . "\n"; echo '<input type="hidden" name="action" value="fred">' . "\n"; echo '<textarea name="proxies" cols=35 rows=' . $maximum_proxies_to_test . '></textarea><br>' . "\n"; if(strlen($password) > 0) echo 'Password: <input type="password" name="password" size="15"><br>' . "\n"; echo '<input type="submit" value="Check proxies">' . "\n"; echo '</form>' . "\n"; } ?> </body> </html>
Последний раз редактировалось b3; 21.02.2010 в 05:05..
|
|
|

22.02.2010, 15:17
|
|
Участник форума
Регистрация: 15.07.2009
Сообщений: 158
Провел на форуме: 698831
Репутация:
34
|
|
не знаете есть в паблике скрипт записи своего кода во все страницы на своем сайте ?! кода права рут...
желательно на пхп
Последний раз редактировалось daniel_1024; 22.02.2010 в 15:20..
|
|
|

23.02.2010, 01:47
|
|
Познающий
Регистрация: 16.03.2009
Сообщений: 82
Провел на форуме: 148667
Репутация:
23
|
|
Парсер с Википедии
Короче делал грабер и парсер как расшырение поиска по википедии по текущей публикации для водпреса. Но оказалось блин что на хостинге отключен курл. А так локалхосте работает. Может кому-то пригодиться.
Код:
<html>
<head>
<title>Parser</title>
</head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.urls
a:link {
FONT-SIZE:10pt; color: #008040;
text-decoration:none;
font-weight: bold;
font-family: Verdana, Arial;}
a:visited {
FONT-SIZE:10pt; color: #008040;
text-decoration:none;
font-weight: bold;
font-family: Verdana, Arial;}
a:active {
FONT-SIZE:10pt; color: #000000;
text-decoration:none;
font-weight: bold;
font-family: Verdana, Arial;}
a:hover {
FONT-SIZE:10pt; color: #000000;
text-decoration:none;
font-weight: bold;
font-family: Verdana, Arial;
}
.urls
{
position: absolute;
top: 20%;
width: 700px;
}
</style>
<body>
<?php
// запрос
$zapros = "Секс";
if ( isset($zapros) )
{
// Урл
$target = "http://uk.wikipedia.org/w/index.php";
// инициализация cURL
$ch = curl_init($target);
// получать заголовки
curl_setopt ($ch, CURLOPT_HEADER, 1);
// если проверяеться HTTP User-agent
curl_setopt ($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3');
// использовать метод POST
curl_setopt ($ch, CURLOPT_POST, 1);
// передаем даные
curl_setopt ($ch, CURLOPT_POSTFIELDS, '?title=Спеціальна%3ASearch&search='.$zapros.'&fulltext=Пошук');
// вернуть результат
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
// делаем запрос
curl_exec ($ch);
// Берем результат
$result = curl_multi_getcontent ($ch);
// Парсимо с помощю регулярки
// масив $var[0] будет помещать результаты полного совпадения с шаблоном
preg_match_all("#(<a href=)(.*)(<span class='searchmatch'>)(.*)(</a>)#", $result, $var);
// выводим результаты
foreach ($var[0] as $value)
{
if ( !preg_match("#http://#", $value) )
{
$value = preg_replace("#/wiki/#", "http://uk.wikipedia.org/wiki/", $value);
}
$urls[] = $value;
}
//Выводим результати
echo '<div align="center" class="urls">';
for ($i=0; $i<15; $i++)
{
echo ''.$urls[$i].'     ';
}
echo '</div>';
}
?>
</body>
</html>
|
|
|

24.02.2010, 19:59
|
|
Новичок
Регистрация: 15.02.2010
Сообщений: 26
Провел на форуме: 204981
Репутация:
5
|
|
Сообщение от HARD2638
Вот держи,старенький,но зато рабочий)))
Код:
<? /************************************************** ************** * * * * * This will perform a basic connectivity and anonymity test * * * * Simply upload to a php enabled webserver and change the * * configurable parameters below if you so desire * * * * 2005-11-11 v0.1 - Compatible with Charon v0.5.3.5 * ************************************************** **************/ ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Online proxy tester</title></head> <body bgcolor="black" text="white"> <?php // Ensure that the timeouts from fsockopen don't get reported as errors (possible, depends on the php server config) error_reporting(0); // Limit the amount of proxies that can be tested at any one time $maximum_proxies_to_test = 5; // Enter a password (if required) to protect the page $password = ''; // Actual proxyjudge part of the page function return_env_variables() { echo '<pre>'."\n"; foreach ($_SERVER as $header => $value ) { if ((strpos($header , 'REMOTE')!== false || strpos($header , 'HTTP')!== false || strpos($header , 'REQUEST')!== false) && ( strpos($header , 'HTTP_HOST') !== 0)) { echo $header.' = '.$value."\n"; } } echo '</pre>'; } // Function to go away and get the page (calls through the proxy back to itself) function get_judge_page($proxy) { // Depending on the server environment, this timeout setting may not be available. $timeout = 15; $proxy_cont = ''; list($proxy_host, $proxy_port) = explode(":", $proxy); $proxy_fp = fsockopen($proxy_host, $proxy_port, $errornumber, $errorstring, $timeout); if ($proxy_fp) { stream_set_timeout($proxy_fp, $timeout); fputs($proxy_fp, "GET " . $_SERVER['SCRIPT_NAME'] . "?test HTTP/1.0\r\nHost: " . $_SERVER['SERVER_NAME'] . "\r\n\r\n"); while(!feof($proxy_fp)) { $proxy_cont .= fread($proxy_fp,4096); } fclose($proxy_fp); $proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n")+4); } return $proxy_cont; } // Check for the control string to see if it's a valid fetch of the judge function check_valid_judge_response($page) { if(strlen($page) < 5) return false; return strpos($page, 'REMOTE_ADDR') !== false; } // Check for the IP addresses function check_anonymity($page) { if(strpos($page, $_SERVER['LOCAL_ADDR']) !== false) return false; return true; } // Takes and tests a proxy // 0 - Bad proxy // 1 - Good (non anon) proxy // 2 - Good (anonymous) proxy function test_proxy($proxy) { $page = get_judge_page($proxy); if(!check_valid_judge_response($page)) return 0; if(!check_anonymity($page)) return 1; return 2; } ////////// Main Page //////////// // If this is a judge request, just return the environmental variables if(getenv('QUERY_STRING') == "test") { return_env_variables(); } // Else check whether we have been passed a list of proxies to test or not // Should really use $_POST but it's been left as $HTTP_POST_VARS for older versions of php (3.x) elseif( (isset($HTTP_POST_VARS['action']) && $HTTP_POST_VARS['action'] === 'fred') && (isset($HTTP_POST_VARS['proxies']) && $HTTP_POST_VARS['proxies'] != '') && ( (strlen($password) == 0) || (isset($HTTP_POST_VARS['password']) && $HTTP_POST_VARS['password'] === $password) )) { $proxies = explode("\n", str_replace("\r", "", $HTTP_POST_VARS['proxies']), $maximum_proxies_to_test + 1); // Set the overall time limit for the page execution to 10 mins set_time_limit(600); // Set up some arrays to hold the results $anon_proxies = array(); $nonanon_proxies = array(); $bad_proxies = array(); // Loop through and test the proxies for($thisproxy = 0; $thisproxy < ($maximum_proxies_to_test > count($proxies) ? count($proxies) : $maximum_proxies_to_test); $thisproxy += 1) { echo 'Testing ' . $proxies[$thisproxy] . ' .....'; flush(); switch(test_proxy($proxies[$thisproxy])) { case 2: echo '.. Anon<br>' . "\n"; $anon_proxies[count($anon_proxies)] = $proxies[$thisproxy]; break; case 1: echo '.. Non anon<br>' . "\n"; $nonanon_proxies[count($nonanon_proxies)] = $proxies[$thisproxy]; break; case 0: echo '.. Dead<br>' . "\n"; $bad_proxies[count($bad_proxies)] = $proxies[$thisproxy]; break; } } echo '<pre>'; echo '<br><b>Anonymous proxies</b>' . "\n"; for($thisproxy = 0; $thisproxy < count($anon_proxies); $thisproxy += 1) echo $anon_proxies[$thisproxy] . "\n"; echo '<br><b>Non-anonymous proxies</b>' . "\n"; for($thisproxy = 0; $thisproxy < count($nonanon_proxies); $thisproxy += 1) echo $nonanon_proxies[$thisproxy] . "\n"; echo '<br><b>Dead proxies</b>' . "\n"; for($thisproxy = 0; $thisproxy < count($bad_proxies); $thisproxy += 1) echo $bad_proxies[$thisproxy] . "\n"; echo '</pre>'; } // Just a blank call of the page - show the form for the user to fill in else { echo '<h2>Online Proxy checker</h2>' . "\n"; echo '<h4>(http://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . ')</h4>' . "\n"; echo 'Enter up to a maximum of ' . $maximum_proxies_to_test . ' prox' . ($maximum_proxies_to_test == 1 ? 'y' : 'ies') . ' to test' . "\n"; echo '<form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '">' . "\n"; echo '<input type="hidden" name="action" value="fred">' . "\n"; echo '<textarea name="proxies" cols=35 rows=' . $maximum_proxies_to_test . '></textarea><br>' . "\n"; if(strlen($password) > 0) echo 'Password: <input type="password" name="password" size="15"><br>' . "\n"; echo '<input type="submit" value="Check proxies">' . "\n"; echo '</form>' . "\n"; } ?> </body> </html>
А можно выложить, чтоб не в одну строчку? 
|
|
|

24.02.2010, 21:56
|
|
Участник форума
Регистрация: 10.09.2009
Сообщений: 120
Провел на форуме: 2212846
Репутация:
56
|
|
Сообщение от maxya
А можно выложить, чтоб не в одну строчку? 
PHP код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>Online proxy tester</title></head>
<body bgcolor="black" text="white">
<?php
// Ensure that the timeouts from fsockopen don't get reported as errors (possible, depends on the php server config)
error_reporting(0);
// Limit the amount of proxies that can be tested at any one time
$maximum_proxies_to_test = 5;
// Enter a password (if required) to protect the page
$password = '';
// Actual proxyjudge part of the page
function return_env_variables()
{
echo '<pre>'."\n";
foreach ($_SERVER as $header => $value )
{
if ((strpos($header , 'REMOTE')!== false || strpos($header , 'HTTP')!== false || strpos($header , 'REQUEST')!== false) && ( strpos($header , 'HTTP_HOST') !== 0))
{
echo $header.' = '.$value."\n";
}
}
echo '</pre>';
}
// Function to go away and get the page (calls through the proxy back to itself)
function get_judge_page($proxy)
{
// Depending on the server environment, this timeout setting may not be available.
$timeout = 15;
$proxy_cont = '';
list($proxy_host, $proxy_port) = explode(":", $proxy);
$proxy_fp = fsockopen($proxy_host, $proxy_port, $errornumber, $errorstring, $timeout);
if ($proxy_fp)
{
stream_set_timeout($proxy_fp, $timeout);
fputs($proxy_fp, "GET " . $_SERVER['SCRIPT_NAME'] . "?test HTTP/1.0\r\nHost: " . $_SERVER['SERVER_NAME'] . "\r\n\r\n");
while(!feof($proxy_fp))
{
$proxy_cont .= fread($proxy_fp,4096);
}
fclose($proxy_fp);
$proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n")+4);
}
return $proxy_cont;
}
// Check for the control string to see if it's a valid fetch of the judge
function check_valid_judge_response($page)
{
if(strlen($page) < 5)
return false;
return strpos($page, 'REMOTE_ADDR') !== false;
}
// Check for the IP addresses
function check_anonymity($page)
{
if(strpos($page, $_SERVER['LOCAL_ADDR']) !== false)
return false;
return true;
}
// Takes and tests a proxy
// 0 - Bad proxy
// 1 - Good (non anon) proxy
// 2 - Good (anonymous) proxy
function test_proxy($proxy)
{
$page = get_judge_page($proxy);
if(!check_valid_judge_response($page))
return 0;
if(!check_anonymity($page))
return 1;
return 2;
}
////////// Main Page ////////////
// If this is a judge request, just return the environmental variables
if(getenv('QUERY_STRING') == "test")
{
return_env_variables();
}
// Else check whether we have been passed a list of proxies to test or not
// Should really use $_POST but it's been left as $HTTP_POST_VARS for older versions of php (3.x)
elseif( (isset($HTTP_POST_VARS['action']) && $HTTP_POST_VARS['action'] === 'fred') &&
(isset($HTTP_POST_VARS['proxies']) && $HTTP_POST_VARS['proxies'] != '') &&
( (strlen($password) == 0) || (isset($HTTP_POST_VARS['password']) && $HTTP_POST_VARS['password'] === $password) ))
{
$proxies = explode("\n", str_replace("\r", "", $HTTP_POST_VARS['proxies']), $maximum_proxies_to_test + 1);
// Set the overall time limit for the page execution to 10 mins
set_time_limit(600);
// Set up some arrays to hold the results
$anon_proxies = array();
$nonanon_proxies = array();
$bad_proxies = array();
// Loop through and test the proxies
for($thisproxy = 0; $thisproxy < ($maximum_proxies_to_test > count($proxies) ? count($proxies) : $maximum_proxies_to_test); $thisproxy += 1)
{
echo 'Testing ' . $proxies[$thisproxy] . ' .....';
flush();
switch(test_proxy($proxies[$thisproxy]))
{
case 2:
echo '.. Anon' . "\n";
$anon_proxies[count($anon_proxies)] = $proxies[$thisproxy];
break;
case 1:
echo '.. Non anon' . "\n";
$nonanon_proxies[count($nonanon_proxies)] = $proxies[$thisproxy];
break;
case 0:
echo '.. Dead' . "\n";
$bad_proxies[count($bad_proxies)] = $proxies[$thisproxy];
break;
}
}
echo '<pre>';
echo 'Anonymous proxies' . "\n";
for($thisproxy = 0; $thisproxy < count($anon_proxies); $thisproxy += 1)
echo $anon_proxies[$thisproxy] . "\n";
echo 'Non-anonymous proxies' . "\n";
for($thisproxy = 0; $thisproxy < count($nonanon_proxies); $thisproxy += 1)
echo $nonanon_proxies[$thisproxy] . "\n";
echo 'Dead proxies' . "\n";
for($thisproxy = 0; $thisproxy < count($bad_proxies); $thisproxy += 1)
echo $bad_proxies[$thisproxy] . "\n";
echo '</pre>';
}
// Just a blank call of the page - show the form for the user to fill in
else
{
echo '<h2>Online Proxy checker</h2>' . "\n";
echo '<h4>(http://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] . ')</h4>' . "\n";
echo 'Enter up to a maximum of ' . $maximum_proxies_to_test . ' prox' . ($maximum_proxies_to_test == 1 ? 'y' : 'ies') . ' to test' . "\n";
echo '<form method="POST" action="' . $_SERVER['SCRIPT_NAME'] . '">' . "\n";
echo '<input type="hidden" name="action" value="fred">' . "\n";
echo '<textarea name="proxies" cols=35 rows=' . $maximum_proxies_to_test . '></textarea>
' . "\n";
if(strlen($password) > 0)
echo 'Password: <input type="password" name="password" size="15">
' . "\n";
echo '<input type="submit" value="Check proxies">' . "\n";
echo '</form>' . "\n";
}
?>
</body>
</html>
Последний раз редактировалось Redwood; 24.02.2010 в 22:01..
|
|
|

25.02.2010, 11:30
|
|
Участник форума
Регистрация: 26.07.2008
Сообщений: 267
Провел на форуме: 1343031
Репутация:
184
|
|
Подскажите, может у кого есть пхп-скрипт (или несложно набросать), который бы делал следующее:
1) берет из файла построчно список УРЛов
2) запрашивает УРЛ/my-string/
3) если код ответа 200, то парсит тэг <title>*</title>
4) заносит в .txt файл.
Сам сделал:
Код:
<?php
$lines = array_map('rtrim',file('zurl'));
foreach ($lines as $line_num => $line)
{
$html = file_get_contents($line);
if(preg_match('/<title>(.*)<\/title>/smU', $html, $matches))
$title = $matches[1];
echo $line.'\t'.$title.'\t';
}
?>
Последний раз редактировалось budden; 25.02.2010 в 14:00..
|
|
|

25.02.2010, 16:48
|
|
Постоянный
Регистрация: 08.11.2008
Сообщений: 498
Провел на форуме: 2603363
Репутация:
278
|
|
Сообщение от budden
Подскажите, может у кого есть пхп-скрипт (или несложно набросать), который бы делал следующее:
1) берет из файла построчно список УРЛов
2) запрашивает УРЛ/my-string/
3) если код ответа 200, то парсит тэг <title>*</title>
4) заносит в .txt файл.
Сам сделал:
Код:
<?php
$lines = array_map('rtrim',file('zurl'));
foreach ($lines as $line_num => $line)
{
$html = file_get_contents($line);
if(preg_match('/<title>(.*)<\/title>/smU', $html, $matches))
$title = $matches[1];
echo $line.'\t'.$title.'\t';
}
?>
PHP код:
$file = "url.txt";
$file = array_map('trim', file($file));
foreach( $file as $n => $url ) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_USERAGENT, 'Opera/9.64 (Windows NT 5.1; U; MRA 5.4 (build 02647); en) Presto/2.1.1');
$ss = curl_exec($ch);
if( preg_match("#HTTP/1.(0|1) 200 OK#i", $ss) ){
preg_match("#<title>(.+)</title>#U", $ss, $title_tmp);
file_put_content('stream.txt', "URL: ".$url.";TITLE: ".$title_tmp[1]."\r\n", FILE_APPEND);
echo "URL: ".$url.";TITLE: ".$title_tmp[1]."<br>"
}
}
Не тестил
|
|
|

26.02.2010, 14:45
|
|
Новичок
Регистрация: 14.12.2009
Сообщений: 9
Провел на форуме: 490600
Репутация:
5
|
|
Нужен скрипт для оперы авто\заполнения форм заказа товара имя, фам, адрес и т.д
|
|
|

26.02.2010, 16:22
|
|
Постоянный
Регистрация: 08.11.2008
Сообщений: 498
Провел на форуме: 2603363
Репутация:
278
|
|
Сообщение от Saskoch
Нужен скрипт для оперы авто\заполнения форм заказа товара имя, фам, адрес и т.д
дай сайт.
|
|
|

26.02.2010, 16:58
|
|
Новичок
Регистрация: 14.12.2009
Сообщений: 9
Провел на форуме: 490600
Репутация:
5
|
|
www.lockerz.com
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|