|  | Posted by lorento on 02/06/07 05:00 
quick and dirty code :<?php
 $fp = fopen ("http://www.abc.com/abc.txt" ,"r");
 $data = fread ($fp, 2048);
 fclose ($fp);
 
 $fp = fopen ("/home/data/abc.txt", "w");
 fwrite ($fp, $data);
 fclose ($f);
 ?>
 
 http://www.mastervb.net/phpbooks/
 
 On Feb 6, 5:20 am, "J.O. Aho" <u...@example.net> wrote:
 > vivekmaha...@gmail.com wrote:
 > > I dont know if I explained myself properly. Actually, suppose there is
 > > a file located on a URL likewww.yahoo.com/gogo.txtand I want to
 > > download gogo.txt from the yahoo website using php. How do I specify
 > > that in PHP ??
 >
 > You can start with reading the following page,http://www.php.net/manual/en/function.fopen.php
 > it will give the information you need on downloading a remote file and saving
 > a file. When working with ftp/http protocols, you will need a wrapper that
 > allows you to use those protocols with fopen().
 >
 > --
 >
 >    //Aho
  Navigation: [Reply to this message] |