Skip to content
Advertisement

Simple Html Dom library works on local server but not in mostly live server

I am using curl for web scraping and to parse html used simple html dom library which is great and simple. But my main problem is that this library works smoothly on local server but not in live server. Strange thing is that it can work on 000webhost hosting without any issue, but when I use other paid hosting like godaddy,namecheap etc.

Paid Hostinger plan also not support. I contacted to godaddy support and they said you need to contact your developer thats not hosting issue.

I searched a lot on internet and found that I need to enable php extension ‘mbstring’, but same issue.

When I search the data it give me empty array like ‘Array’. I try everything but can not get any solution and also not get whats the issue with that.

JavaScript

Advertisement

Answer

Try below curl settings, I think the problem is curl instead of html_simple_dom.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement