Mam mały problem z PHP Simple HTML DOM Parser ( http://sourceforge.net/projects/simplehtmldom/files/ ), wyciągam zawartość diva z innej stronki kodem:
Kod
<?php
include_once('simple_html_dom.php');
$przedmiot = $_GET["przedmiot"];
$html = file_get_html('http://kecja.pl/'.$przedmiot);
$item = $html->find('#myDesc-1', 0)->outertext;
print_r($item);
?>
include_once('simple_html_dom.php');
$przedmiot = $_GET["przedmiot"];
$html = file_get_html('http://kecja.pl/'.$przedmiot);
$item = $html->find('#myDesc-1', 0)->outertext;
print_r($item);
?>
No i wszystko śmiga.
Stronka: http://kecja.pl/Mata_Edukacyjna.html
Efekt końcowy: http://bot.pe.hu/przedmiot.php?przedmiot=M...Edukacyjna.html
Gorzej jest jeśli w opisie produktu znajduje się odtwarzacz z YT.
Stronka: http://kecja.pl/Samoch%C3%B3d_Auto_Monster_Truck_RC.html
Efekt końcowy: http://bot.pe.hu/przedmiot.php?przedmiot=S...r_Truck_RC.html
Pokazuje się komunikat:
Cytat
Warning: file_get_contents(http://kecja.pl/Samochód_Auto_Monster_Truck_RC.html): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in /home/u917930839/public_html/simple_html_dom.php on line 75
Fatal error: Call to a member function find() on a non-object in /home/u917930839/public_html/przedmiot.php on line 16
Fatal error: Call to a member function find() on a non-object in /home/u917930839/public_html/przedmiot.php on line 16
No i nie wiem w czym tkwi problem
