Developer Error you must specify a absolute path in the url to use ($url)"); } if($cdn_proto) $prepend="$cdn_proto://$cdn_domain"; //for the time being, lets turn off the content distribution network so we can get a day of logs without /customcommands/riofarm/app/webstransation.im.calc if($prepend&& file_exists($_SERVER[DOCUMENT_ROOT].$url)) { $st = stat($_SERVER[DOCUMENT_ROOT].$url); if($st[ctime]>time() - 86400) //if the files been modified in the last { $newurl = list_allbutlast($url,".").".CDN_URL.$st[mtime].".list_last($url,"."); /* //this code used to create a uniquely named link so that the any changes on the server would come through the cnd caching server, //now there is rewrite rule in .htaccess which handles any file called CDN_URL and automatically renames it, // doing this makes it so we do not have to delete out CDN_URL links below, but it also make this work with a server farm where we do not necessarily know where the file will be requesetd from $tststat = @stat($_SERVER[DOCUMENT_ROOT].$newurl); if(!$tststat) { //$cmd = "/bin/ln -s \"$_SERVER[DOCUMENT_ROOT]$url\" \"$_SERVER[DOCUMENT_ROOT]$newurl\" "; //d($cmd); //`$cmd`; } */ $url = $newurl; } } $url = $prepend.$url; timetrack_stop(cdn_url); return $url; }