View Single Post
Old 10-19-2004, 02:02 PM  
jwerd
Confirmed User
 
Industry Role:
Join Date: Jun 2003
Location: Costa Rica
Posts: 1,953
Quote:
Originally posted by swedguy
PHP Code:
$content implode(''file('http://www.domain.com/sup.txt'));
$fp fopen("file.txt""w");
if (
$fp) {
  
fwrite($fp$content);
  
fclose($fp);

A simple one. It will write http://www.domain.com/sup.txt to file.txt (owerwrite and truncate file.txt if it exist).
Juicy, you can also make it so it grabs it from a query string (EG: script.php?file=whatever.txt&url=http://www.wow.com/wtf.txt).

The code would be changed to:
PHP Code:
<?php
$content 
implode(''file($_GET['url']));
$fp fopen("".$_GET['file']."""w");
if(
$fp)
  
fwrite($fp$content);

fclose($fp);
But goodjob to everyone who participated as well Goodluck
__________________
Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com
jwerd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote