Changed file_get_contents to curl