dom - Scraping website post data with PHP -



dom - Scraping website post data with PHP -

i have website want scrap www.tiketux.com , want fill form can info in www.tiketux.com/book/pilihjadwal

i found post info https://www.tiketux.com/book/pilihjadwal/post?agen=cpg&keberangkatan=0004&tujuan=153&jumpenumpang=1&datepicker=15%2f10%2f2014&idjurusan=153&kotaasal=bandung

in page can found travel schedule seek using dom , curl info can't load,, can help me how data?

thanks

$options = array( 'http' => array( 'header' => "content-type: text/html;charset=utf-8\r\n", 'method' => 'post', 'content' => http_build_query([]), ) ); $context = stream_context_create($options); $result = file_get_contents('https://www.tiketux.com/book/pilihjadwal/post?agen=cpg&keberangkatan=0004&tujuan=153&jumpenumpang=1&datepicker=15%2f10%2f2014&idjurusan=153&kotaasal=bandung', false, $context); $doc = new domdocument(); @$doc->loadhtml($result);

$doc dom-document url. manual: http://php.net/manual/en/class.domdocument.php

php dom curl screen-scraping postdata

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -