VolodinAS
27.12.2012 - 23:22
Цитата |
Warning: file_get_contents(ssl://itunes.apple.com/us/app/minecraft-pocket-edition/id479516143?mt=8) [function.file-get-contents]: failed to open stream: No error in V:\home\parser_forapple.ru\www\simple_html_dom.php on line 39 |
Вот код парса:
set_time_limit(0);
include_once('simple_html_dom.php');
$html = file_get_html($page2);
foreach($html->find("div.price") as $setprice){
$price = $setprice->plaintext;
echo "$price <a href=\"$page\">$page</a>";
}
В чем может быть причина? Из-за того, что file_get_contents несовместим с https? Потому что страницу
http://ya.ru он без ошибок спарсил...
You should try using curl or perhaps try fsockopen with the ssl:// protocol wrapper.
VolodinAS
27.12.2012 - 23:54
Tell me about ssl more concretic, pls. Or write example for me.
VolodinAS
28.12.2012 - 00:54
Добавил скрипт в отдельный файл, сделал include.
сделал такой код:
include("curl_graber.php");
curl_grab_page($page, "http://www.google.com/", "", "true", "null", "false");
выдал он мне такую ошибку:
Цитата |
Fatal error: Cannot redeclare curl_grab_page() (previously declared in V:\home\parser_forapple.ru\www\curl_graber.php:10) in V:\home\parser_forapple.ru\www\curl_graber.php on line 42 |
Игорь_Vasinsky
28.12.2012 - 10:31
2 раза инициализируешь функцию.
_____________
HTML, CSS (Bootstrap), JS(JQuery, ExtJS), PHP, MySQL, MSSql, Posgres, (TSql, BI OLAP, MDX), Mongo, Git, SVN, CodeIgnater, Symfony, Yii 2, JiRA, Redmine, Bitbucket, Composer, Rabbit MQ, Amazon (SQS, S3, Transcribe), Docker
EndoCrinolog
28.12.2012 - 19:12
ммм... нет, из инклуда я убрал вызов функции