Jim from Oakland Posted March 31, 2006 Share Posted March 31, 2006 PhreaxOn 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 https://forums.phpfreaks.com/topic/6290-copy-file-from-web-site-to-my-pc/ Share on other sites More sharing options...
craygo Posted March 31, 2006 Share Posted March 31, 2006 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 https://forums.phpfreaks.com/topic/6290-copy-file-from-web-site-to-my-pc/#findComment-22724 Share on other sites More sharing options...
Jim from Oakland Posted March 31, 2006 Author Share Posted March 31, 2006 thanks rayI 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 https://forums.phpfreaks.com/topic/6290-copy-file-from-web-site-to-my-pc/#findComment-22730 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.