File not getting read using file_get_html

2019-09-07 16:25发布

问题:

I am using curl to store webpage in txt file and then reading the file to parse its content. For some website its running fine but for some websites it is(file_get_html) returning null. I have checked that txt file is generated with data but it is unable read the content.

For this website when i use direct link in file_get_html at that time also it returns null. I have added user agent but not working. Finally i removed all the content from file except one div tag at that time it read the content.

Kindly suggest why is it happening like this?