Ultimater
05-04-2006, 01:49 PM
http://aplustv.com/public_stuff/Http_Requester.htm
Hit the "Get Source" button in Firefox and the script will work properly displaying a "Please Wait" message to the right of the button and displaying "Done" when it's done. However Firefox will still display a message "transfering data" in the status bar which doesn't go away.
scriptgrabber_script.php:
<?php
function jsescape($string) {
$find = array('\\', '"', '/', "\b", "\f", "\n", "\r", "\t", "\u", "<", ">");
$repl = array('\\\\', '\"', '\/', '\b', '\f', '\n', '\r', '\t', '\u', "\\<", "\\>");
$string = str_replace($find, $repl, $string);
return $string;
}
$path=strtolower($_REQUEST['url']);
$contents = "";
if(substr($path,0,4)=="http"){
$contents = @file_get_contents($path);
}
$contents = jsescape($contents);
echo "requestDone(\"".$contents."\");\r\n";
exit(0);
?>
Hit the "Get Source" button in Firefox and the script will work properly displaying a "Please Wait" message to the right of the button and displaying "Done" when it's done. However Firefox will still display a message "transfering data" in the status bar which doesn't go away.
scriptgrabber_script.php:
<?php
function jsescape($string) {
$find = array('\\', '"', '/', "\b", "\f", "\n", "\r", "\t", "\u", "<", ">");
$repl = array('\\\\', '\"', '\/', '\b', '\f', '\n', '\r', '\t', '\u', "\\<", "\\>");
$string = str_replace($find, $repl, $string);
return $string;
}
$path=strtolower($_REQUEST['url']);
$contents = "";
if(substr($path,0,4)=="http"){
$contents = @file_get_contents($path);
}
$contents = jsescape($contents);
echo "requestDone(\"".$contents."\");\r\n";
exit(0);
?>