Hi
Is there a way to put absolute URLs into an fopen command? Here is an extract of the code:
$url = "http://192.168.0.23:8011";
$url2 = "http://192.168.0.23:8111";
............
function copy( $url )
{
$sourcepage = "$url/php-components/ec_credit_cards.php";
$targetfilename = "$url2/copied.shtml";
$dynamic_source = fopen($sourcepage, 'r');
$htmldata = fread($dynamic_source, 1024*1024);
fclose($dynamic_source);
$targetfile = fopen($targetfilename, 'w');
fwrite($targetfile, $htmldata);
fclose($targetfile);
}
I get the following error:
Warning: fopen(http://192.168.0.23:8011/copied.shtml): failed to open stream: HTTP wrapper does not support writeable connections. in C:\Program Files\Apache Group\Apache2\www\test\htdocs\matt\cron\cron.php on line 23
The script works fine if I use a relative url, but I need to copy the file to a different port.
Thanks