|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I need to automate some file transfers between two sites. I just tried the script below to see if I could connect and got nothing. Then I found out that my hosting (ATT/Yahoo) does not support the standard ftp functions of php.
Is there a work around for this? are there HTTP functions I can use? PHP Code: echo"testing the ftp connection"; $ftp_server = "ftp.somesite.com"; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server"); echo"Connected!!! </br>"; $ftp_user="name"; $ftp_pass="password"; // try to login if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as $ftp_user@$ftp_server\n"; } else { echo "Couldn't connect as $ftp_user\n"; } // close the connection ftp_close($conn_id); echo"Connection closed!"; I'll be changing hosting company soon! I am really tired of the quirks with this bunch. Thanks folks! |
|
|||
|
If they have socket functions enabled then you can use a pure PHP based FTP client.
A quick google gives Class: Advanced FTP client class (ftp, socket, ftp class, sockets) - PHP Classes I've not tried it but there are others about. It's not that hard to write a pure PHP FTP client. If you just want to pull data from the remote server then you could try using curl functions (PHP: cURL - Manual) to read the data as you would a web page, however remember that data is publicly available unless you password protect it. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PR5 / PR3 Link Exchange With "work at home" Sites | logistas | Link Exchange | 1 | 08-20-2008 01:58 AM |
| "nofollow" - Does it Really Work Like Google Claim | kimber23 | Google Discussion Forum | 40 | 03-30-2008 01:16 AM |
| how to work with CSS building the "skeleton" of th | duffs22 | Graphics & Design Discussion Forum | 1 | 03-22-2007 01:12 PM |
| SEO. Building portfolio - will work "for food" | Dervish | Services for Sale/Hire | 1 | 12-30-2005 04:45 PM |
| "Unpicked.com" - backorder, does it work ?? not th | David Pearson | Domain Discussion Forum | 2 | 06-03-2004 11:36 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |