The easiest way to do this is by using file_get_contents(), which can open a file or a URL. You can also use sockets or curl, which are a little more involved, but still only a few lines of code.
http://www.php.net/curl Look at example 1 for getting a URL with curl. Brandon Rich wrote: > Hi all. > > I'm not real good with PHP... YET. :) > > I am trying to see if there is a way to have a PHP script go to > another site, pull down a text file, and write that file to the > server. Not really sure where to start with this so would appreciate > it if anyone would be able to point me to a sample script or something > along those lines. > > Thanks! > > Rich > > -- --------------------------------- * Brandon Smith * programmer / web designer * http://sproutworks.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
