Jump to content


Photo

"copy" file from web site to my PC


  • Please log in to reply
2 replies to this topic

#1 Jim from Oakland

Jim from Oakland
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 31 March 2006 - 06:31 PM

Phreax

On my Windows XP PC my php script iterates through monthly zip files on a public website so it can "copy" them to the directory on my PC containing the script. Here is one of the files.

[a href=\"http://mis.nyiso.com/public/csv/damlbmp/20050301damlbmp_zone_csv.zip\" target=\"_blank\"]http://mis.nyiso.com/public/csv/damlbmp/20...mp_zone_csv.zip[/a]

How do I tell php to put a copy of that file on my PC in the script's directory?

Thanks much!

Jim

#2 craygo

craygo
  • Staff Alumni
  • Advanced Member
  • 1,973 posts
  • LocationRhode Island

Posted 31 March 2006 - 07:23 PM

You won't be able to do it unless you make your computer into a web server, with php installed on it, or install an ftp server on your box. You cannot make your web server go out and "push" files to another computer unless you have ftp.

You could do this all thru command line though and then put it into a scheduled task. It is pretty easy to do. Let me know if you want to do it and I will give you some code.

Ray

#3 Jim from Oakland

Jim from Oakland
  • Members
  • PipPipPip
  • Advanced Member
  • 41 posts

Posted 31 March 2006 - 07:38 PM

thanks ray

I gave too little background: I use 4.31 and Apache on my Windows XP system.

And I found that the php copy file system function works fine.


[!--quoteo(post=360450:date=Apr 1 2006, 02:23 AM:name=craygo)--][div class=\'quotetop\']QUOTE(craygo @ Apr 1 2006, 02:23 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
You won't be able to do it unless you make your computer into a web server, with php installed on it, or install an ftp server on your box. You cannot make your web server go out and "push" files to another computer unless you have ftp.

You could do this all thru command line though and then put it into a scheduled task. It is pretty easy to do. Let me know if you want to do it and I will give you some code.

Ray
[/quote]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users