Replacing standard file_get_contents() querying with cURL

Title pretty much says all, also added SSL support whenever source is in HTTPS.