Jump to content

"copy" file from web site to my PC


Jim from Oakland

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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) [snapback]360450[/snapback][/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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.