How to crawl website with breeze caching normaly
-
include('/simple_html_dom.php'); $url = "https://www.2311666.com.tw/"; $opts = array( 'http'=> array('header'=>"User-Agent:Chrome/94.0.4606.81\r\n")); $context = stream_context_create($opts); $html = new simple_html_dom(); $get = file_get_contents($url,false,$context); $html->load($get); echo $html;
P.S. The above code is deployed on the server.
I’ve no problem scraping most of websites but some specific sites with Breeze internal caching return gibberish.To be more precise, the first crawl is normal but second crawl show gibberish.
I’ve tried using cURL or dynamic User-Agent but get the same result. Is there a correct way?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to crawl website with breeze caching normaly’ is closed to new replies.