3v4l.org

run code in 300+ PHP versions simultaneously
<?php #Settings $interval = 30; $filename = 'picture.jpg'; $url = "http://www.goudenspike.nl/webcam/picture.jpg"; $fetchurl = "http://77.172.6.176:50015/picture.jpg"; #get file time if (file_exists($filename)) { $filetime = filemtime($filename); } else { copy($fetchurl,$filename); $filetime = filemtime($filename); } $time = time(); $diff = $time - $filetime; if($diff > $interval){ copy($fetchurl,$filename); } #header("Location: $url"); echo "<meta http-equiv=refresh content=30><IMG SRC=$url WIDTH=576 HEIGHT=432>"; exit; ?>

preferences:
34.26 ms | 402 KiB | 5 Q