3v4l.org

run code in 300+ PHP versions simultaneously
<?php $curl = curl_init('http://s3-ap-southeast-1.amazonaws.com/cobo-nwddev/photo/pho_0Mp1oQ.jpg'); //don't fetch the actual page, you only want headers curl_setopt($curl, CURLOPT_NOBODY, true); //stop it from outputting stuff to stdout curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // attempt to retrieve the modification date curl_setopt($curl, CURLOPT_FILETIME, true); $result = curl_exec($curl); if ($result === false) { die (curl_error($curl)); } $timestamp = curl_getinfo($curl, CURLINFO_FILETIME); if ($timestamp != -1) { //otherwise unknown echo date("Y-m-d H:i:s", $timestamp); //etc }

preferences:
58.09 ms | 402 KiB | 5 Q