Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable saved as a file 2

Status
Not open for further replies.

solex

Programmer
Feb 28, 2003
91
0
0
GB
Hello,

I want to save the contence of a variable as a .torrent file in a specified location, but can only find info on handling uploads and im not sure how to translate this to what i need

Thanx in advance

solex
 
ok, ive got it working so far as fopen creating the file, but i still get the stream error.

solex
 
Just want to let you know that when your using
Code:
    // get page source
    $torrentDownloadReturned = fopen($torrentDownloadAddress, "r") or die("cannot open remote file");
    $torrentDownloadReturned = stream_get_contents($torrentDownloadReturned);
your losing the handle for closing the file. If PHP for some reason doesn't close the file on its own, you may run into a memory leak problem.

---------------------------------------
TINSTAAFL, which is why I contribute.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top