using cURL instead of poor file_get_contents