Skip to content
Advertisement

file_get_html() not working in Google App Engine

I have some PHP code working perfectly in local and also in the web (with a non SSL hosting). I get file contents with file_get_html(url) and everything works OK.

The problem comes when I try to run this code in Google App Engine. The function file_get_html() doesn’t work.

The following code shows nothing between BEGIN and END:

JavaScript

Any help will be appreciated!

Advertisement

Answer

Finally I found the solution. I use curl instead file_get_html.

Code that doesn’t work for me in Google App Engine:

JavaScript

Code that work perfectly for me in Google App Engine:

JavaScript

It is a bit more verbose but works 🙂

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