Menu
I have the following code:
[code=php]$sourcefile = fopen(‘http://foo.com/file.xml’,r);
$writefile = fopen(‘file.xml’, w);
What function can I use to save the ‘sourcefile’ as the ‘writefile’?
I tried:
[code=php]fwrite ($writefile,$sourcefile);
but ended up with a file named file.xml containing “Resource id #1”
Thanks for your help!