Jump to content


ftp_put() - copying files from other sites


4 replies to this topic

#1 Lang

    Young Padawan

  • Members
  • Pip
  • 198 posts
  • Gender:Male
  • Location:Ontario, Canada

Posted 05 December 2006 - 06:55 PM

$upload = ftp_put($conn_id, 'test.zip', 'http://somedomain.com/test.zip', FTP_BINARY);

Is it possible to use FTP to copy a file to the server using a URL? I am able to create the file on my server, however its 0k, is there another function I can use?

Thanks,
Lang

#2 pirateXcore

    Young Padawan

  • Members
  • Pip
  • 281 posts
  • Gender:Male

Posted 05 December 2006 - 09:00 PM

Sorry, I gotta ask why you want to do this though?
Are you trying to rip some ones site because you sux, or is there a reason worth some one helping you?

#3 dEcade

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 1,850 posts
  • Gender:Male
  • Location:Saskatoon, Saskatchewan
  • Interests:Guitar, Programming, Storm Chasing, Games (Designing and playing), Hockey, Photography

Posted 05 December 2006 - 09:13 PM

What type of files, like HTML you can just look at the source and copy it and save it...

dEcade

#4 Wolfe

    Young Padawan

  • Members
  • Pip
  • 102 posts
  • Gender:Male
  • Location:Louisiana

Posted 06 December 2006 - 01:58 PM

Wouldn't it depend on the CHMOD properties of the file on the other server?

It would probably work the same way including a remote file would, wouldn't it? It would depend on permissions.

I don't know.. just a guess, you should just mess around with it and see what you can get.

#5 Hayden

    P2L Jedi

  • Members
  • PipPipPip
  • 716 posts
  • Gender:Male
  • Location:Texas

Posted 06 December 2006 - 09:10 PM

View PostLang, on Dec 5 2006, 05:55 PM, said:

$upload = ftp_put($conn_id, 'test.zip', 'http://somedomain.com/test.zip', FTP_BINARY);

Is it possible to use FTP to copy a file to the server using a URL? I am able to create the file on my server, however its 0k, is there another function I can use?

Thanks,
Lang

I assume by PUT you want to copy inforation TO the server.

You'll need to establish a connection first, hence the $conn_id.

Make sure you have a valid account with the proper username and password to login to the server.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users