01.01.2011, 21:37
|
Start Post: помогите со скриптом
|
Mr. Lucky Guy
Регистрация: 27.07.2010
Адрес: RU -> DE -> Asia
Сообщений: 706
Бабло: $175250
|
вот тот самый скрипт, которым берутся кеи с догпайла. Хотел его немного изменить так, чтоб он брал кеи, например, отсюда http://fifa10.isgreat.org. Что, кроме 5-ой строки с урлом нужно ещё переделать?
PHP код:
<?
function get_keyword()
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.dogpile.com/dogpile/ws/service/DPServices.asmx/GetSearchSpy');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"numTerms":'.mt_rand(15,36).',"filter":true}'); // numTerms - кол-во кеев за раз ;)
$response = curl_exec($ch);
curl_close($ch);
$feed = new SimpleXMLElement($response);
$out=array();
foreach ($feed->channel->item as $item)
{
$key=(string)$item->title . '';
if(count(explode(' ', $key))>=3 && !ereg('oogle|dating|pussy|sex|porn|ass|model|fuck|cock|naked|celebrit|tit|anal|oral|blowjob|mature|nude|lolita|zoo|lady|tube|vid|mov|pic|rape|child|erot', $key))
{
if(check_dupes($key)==true)
{
$out[]=$key;
}
}
}
if(count($out)>0)
{
$fd=fopen('./used.txt','a+');
fwrite($fd, trim($out[0])."\r\n");
fclose($fd);
return array($out[0]);
}
return false;
}
?>
|
|
|