##updates it on server
$new_tpl = "this is what i wanna update";
$fd = fopen ("http://www.myserver.com/tgp.tpl", "r+");
//$tpl = fread ($fd, filesize ("http://www.myserver.com/tgp.tpl"));
//echo $tpl;
if (!fwrite($fd, $new_tpl)) {
print "Cannot write to file ";
exit;
}
i am runing this on localhost