Tuesday 15 April 2014

php - Getting dynamic HTML output from another page on a server (perhaps file_get_contents) -


I am using MVC framework code igniter for my work, if it is relevant.

My page / controller, I want to capture output HTML via another page on the site as a string (to use as an email or newsletter). I tried:

  $ string = file_get_contents ('http://www.examplesite.com/path/to/page');  

but $ string becomes just false , what the document says, it means it has failed, I remember some sad thing Coming to ...

Perhaps you can try using curl here is an example here You can see:


No comments:

Post a Comment