Current location: Hot Scripts Forums » Programming Languages » PHP » How to copy files from remote server to local server without using ftp connection...


How to copy files from remote server to local server without using ftp connection...

Reply
  #1 (permalink)  
Old 06-14-05, 01:17 PM
ajay007_bond ajay007_bond is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
How to copy files from remote server to local server without using ftp connection...

Can any one suggest how to move image files from remote server to local server without using ftp....plz include the php code giving an example where to include the source folder and destination folder,,,

Iam connecting the remote server through the remote desktop connection in Windows XP....
Reply With Quote
  #2 (permalink)  
Old 06-14-05, 02:42 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Code:

<?php


//original image
$img "http://www.site.com/blah.gif";

//directory to copy to (must be CHMOD to 777)
$copydir "/home/user/public_html/directory/";

$data file_get_contents($img);
$file fopen($copydir "blah.gif""w+");
fputs($file$data);
fclose($file);

?>
not entirely sure that will work but its worth a try
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
  #3 (permalink)  
Old 06-14-05, 03:21 PM
ajay007_bond ajay007_bond is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Plzz help me

My images are in the folder which are directly collected from satellite ......so It is not having any http address...plz help me regarding this
Reply With Quote
  #4 (permalink)  
Old 06-15-05, 01:02 PM
ajay007_bond ajay007_bond is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Help me out

I need to copy the whole set of live images ....so when the images are updated in the folder in the remote serve(obtained from satellite) , then the images must be refreshed automatically in the local webserver....
Reply With Quote
  #5 (permalink)  
Old 06-15-05, 08:47 PM
humaneasy humaneasy is offline
New Member
 
Join Date: Jun 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Some samples required

Quote:
Originally Posted by ajay007_bond
I need to copy the whole set of live images ....so when the images are updated in the folder in the remote serve(obtained from satellite) , then the images must be refreshed automatically in the local webserver....
Put a sample of how do you usually copy your files so we can see what you want to do.

Can fake the DIRs and/or URIs

Best,

Lopo
Reply With Quote
  #6 (permalink)  
Old 06-15-05, 10:35 PM
ajay007_bond ajay007_bond is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
My files are in remote directory i.e Z:/NVG Images
My local server is on W:/Satellite Images

Iam placing a screen shot here of the remote directory

http://i9.photobucket.com/albums/a76...creenshot1.jpg

Iam also placing the screen shot of local server directory.Actually these are the old images copied manually.

http://i9.photobucket.com/albums/a76...liteimages.jpg
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW To transfer images from one local server to web server ajay007_bond PHP 4 06-12-05 04:05 AM
move files around an ftp server, with php file upload script? wapchimp PHP 2 12-19-04 07:27 AM
ASP syntax error stuckonaproject ASP 8 12-14-04 10:30 AM
open text file from a server ftp Deadlock Perl 2 10-26-04 04:45 AM
Error while creating database (Errornumber 2002: "Can't connect to local MySQL server lylesback2 PHP 5 04-11-04 01:37 PM


All times are GMT -5. The time now is 06:50 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.