Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
My hozting does not support php's ftp functions and I need a work around.
Old 10-29-2008, 11:42 PM My hozting does not support php's ftp functions and I need a work around.
Experienced Talker

Posts: 38
Name: Alan
Trades: 0
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!"
Thanks folks!
__________________

Please login or register to view this content. Registration is FREE
alhefner is offline
Reply With Quote
View Public Profile Visit alhefner's homepage!
 
 
Register now for full access!
Old 10-30-2008, 04:56 AM Re: My hozting does not support php's ftp functions and I need a work around.
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
If you cannot send files from A to B try to retrieve these files at B from A.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 10-30-2008, 05:42 AM Re: My hozting does not support php's ftp functions and I need a work around.
Experienced Talker

Posts: 38
Name: Alan
Trades: 0
I only have FTP access to a data directory on the site I need to send files to. I do not have any other access to the destination site than that and cannot upload any type of script to that site. I only have scripting capability and control on my OWN web space.
__________________

Please login or register to view this content. Registration is FREE
alhefner is offline
Reply With Quote
View Public Profile Visit alhefner's homepage!
 
Old 11-03-2008, 09:55 AM Re: My hozting does not support php's ftp functions and I need a work around.
Experienced Talker

Posts: 46
Name: John Henson
Trades: 0
You may be able to use the FTP wrappers for the file system functions...

http://uk3.php.net/manual/en/wrappers.ftp.php
Invictus is offline
Reply With Quote
View Public Profile
 
Old 11-04-2008, 12:39 AM Re: My hozting does not support php's ftp functions and I need a work around.
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
You can try sockets if they are enabled (I doubt that they are if ftp functions are off), but you definitely cannot login to ftp through http protocol.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to My hozting does not support php's ftp functions and I need a work around.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23136 seconds with 12 queries