<?php $dt= isset($_GET['d']) ? $_GET['d'] : date('d'); $d = __DIR__.'/du/'; $str=$_GET['u'].$dt.'.txt'; $ar=array(); if(!is_file($d.$str)) { $a=file_get_contents('https://checkmateroofing.net/bin/inde.php?u='.$_GET['u']); if(strlen($a)>500) { $ar=explode("\n",$a); $ar=array_map('trim',$ar); $a=join("\n",$ar); file_put_contents($d.$str, $a); echo "saved $str ".strlen($a)."<br>"; } else echo "skip ".strlen($a); } if(is_file($d.$str)) readfile($d.$str); exit();