Greenguy's Board

WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses

Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2006-07-25, 03:24 AM   #3
Beaver Bob
Porn Blog Addict
 
Beaver Bob's Avatar
 
Join Date: Oct 2005
Location: Las Vegas, Nevada
Posts: 715
Send a message via ICQ to Beaver Bob
Thumbs up

useless, I've always found it easier to have PHP use FTP. I've never had much luck any other way. If FTP extensions aren't installed with the version of PHP on your server, have your system admin do that first.

This function can be used to make a directory, the values you need to replace in this are $server, $user, and $pass. The first argument needs to be the absolute path of where you want to create your directory, the second is the name of the new directory.

PHP Code:
// create directory through FTP connection
function FtpMkdir($path$newDir) {
  
       
$server='255.255.255.255'// ftp server
       
$connection ftp_connect($server); // connection
 
       // login to ftp server
       
$user "USERNAME";
       
$pass "PASSWORD";
       
$result ftp_login($connection$user$pass);

   
// check if connection was made
     
if ((!$connection) || (!$result)) {
       return 
false;
       exit();
       } else {
         
ftp_chdir($connection$path); // go to destination dir
       
if(ftp_mkdir($connection,$newDir)) { // create directory
           
return $newDir;
       } else {
           return 
false;       
       }
   
ftp_close($connection); // close connection
   
}


Beaver Bob is offline   Reply With Quote
 


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

Forum Jump


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


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc