Use PHP and cURL to retrieve URL contents (with a few options)
Posted by Andy Langton on Monday, 27 July 2015url_get_contents - a function to retrieve the contents of a remote URL with PHP and the cURL library.[break]Because I've used this function for a few different projects, it's grown to be a bit of a monster, however you can still use it in a pretty basic way, i.e. url_get_contents("http://www.example.com");
I'm not a professional programmer by any means, and I suffer from lack of organisation of common code that I use. So, I'm going to post a few of the things that I hunt for here, to save myself a bit of a search. Hopefully they may be useful to someone else too.