HomeWeb HostingReseller Web HostingDedicated ServerResources & Support

Go Back   Web Hosting Technical Support Discussion Forum > General Web Hosting Discussion Forum and Support > How To's > PHP Scripts

PHP Scripts Post Only PHP Scripts in this section... Accu Web Hosting
Become a Fan


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 10-28-2008
Administrator
 
Join Date: Jun 2006
Age: 26
Posts: 266
Blog Entries: 9
Rep Power: 10
Shane has disabled reputation
Default How To Upload File Via FTP Using PHP Code?

Hello All,

In order to upload file/s or folder/s on web server using PHP Code one can use below mentioned sample script:

<?php
require_once "PHPFTP.php";

$ftp = new PHPFTP();

$result = $ftp->Connect('www.yourdomain.com','login name','password');
if ($result == 0)
{
$ftp->DoCommand('enter command here', $result_number, $result_text);
echo "$result_text ($result_number)";
$ftp->DoCommand('another command', $result_number, $result_text);
echo "$result_text ($result_number)";
$ftp->Disconnect();
}
?>

That’s it!

Thanks,

Shane G.
AccuWebHosting.Com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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 On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:11 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
http://www.accuwebhosting.com/terms.htm


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42