PHP FTP 1.1
A freeware script enabling PHP scripts to make FTP connectionsDownload | Requirements | Limitations | Security | Usage Examples
Requirements:
PHP FTP requires PHP version 4.3 or higher, with support for fsockopen enabled.
Limitations:
This script provides only the most basic of FTP services, which do not include the handling of data connections. "Then what is it good for?" you ask? If FTP functions are enabled in your server's PHP installation, maybe nothing. But if not, then this script is useful for doing anything that doesn't require a data connection. For example, I wrote it to provide an automatable way to set folder access permissions using the "site chmod" command.
Security:
We strongly recommend that you do not store your username and password in a PHP script unless only people you trust completely have access to your server. Instead, use a form to enter the username and password each time the script is run. Exercize caution with any system that transmits passwords over unencrypted connections.
Amazon Wants Patent For Inserting Ads Into Books
Jul 3@6:02pm: theodp writes "Three Amazon inventors set out to correct what they felt was a real problem: that 'out-of-print or rare books ... typically do not include advertisements ... the content is fixed and, therefore, has not been adapted to modern market... [from Slashdot]
Jul 3@6:02pm: theodp writes "Three Amazon inventors set out to correct what they felt was a real problem: that 'out-of-print or rare books ... typically do not include advertisements ... the content is fixed and, therefore, has not been adapted to modern market... [from Slashdot]
Fake Tamiflu "Out-Spams Viagra On Web"
Jul 3@5:11pm: cin62 writes "The number of Internet scammers offering fake versions of the anti-swine flu drug Tamiflu has surpassed those selling counterfeit Viagra, reports CNN. Since the H1N1 virus, also known as swine flu, was declared a global pandemic last... [from Slashdot]
Jul 3@5:11pm: cin62 writes "The number of Internet scammers offering fake versions of the anti-swine flu drug Tamiflu has surpassed those selling counterfeit Viagra, reports CNN. Since the H1N1 virus, also known as swine flu, was declared a global pandemic last... [from Slashdot]
Why Sony's PSP Go speed boost won't up the eye candy
Jul 3@2:34pm: SonyInsider dug up an FCC filing that indicates that the forthcoming PSP Go will have a significantly faster top processor speed than than current PSP models. Specifically, the Go's CPU can clock up to 480MHz, compared to the 333MHz speed of the e... [from Ars Technica]
Jul 3@2:34pm: SonyInsider dug up an FCC filing that indicates that the forthcoming PSP Go will have a significantly faster top processor speed than than current PSP models. Specifically, the Go's CPU can clock up to 480MHz, compared to the 333MHz speed of the e... [from Ars Technica]
Are "deleted" photos really gone from Facebook? Not always
Jul 3@11:32am: In an age where your boss, coworkers, parents, and even (*gasp*) grandparents are finally joining social networks, we are all more aware than ever that we had better keep things relatively clean. And if you were someone who joined MySpace, Faceboo... [from Ars Technica]
Jul 3@11:32am: In an age where your boss, coworkers, parents, and even (*gasp*) grandparents are finally joining social networks, we are all more aware than ever that we had better keep things relatively clean. And if you were someone who joined MySpace, Faceboo... [from Ars Technica]
Dish Network DVR Features Get Stay of Execution
Jul 2@12:30pm: The final day of reckoning in the four-year battle between TiVo and EchoStar has been pushed out a little further. Late Wednesday evening, the U.S. Court of Appeals for the Federal Circuit granted EchoStar's request to stay a contempt order impose... [from E-Commerce Times]
Jul 2@12:30pm: The final day of reckoning in the four-year battle between TiVo and EchoStar has been pushed out a little further. Late Wednesday evening, the U.S. Court of Appeals for the Federal Circuit granted EchoStar's request to stay a contempt order impose... [from E-Commerce Times]
Large Tech Firms: Beware of Obama Administration's Antitrust Plans
Jul 2@5:00am: In a dramatic repudiation of Bush administration policies, the Antitrust Division of the U.S. Justice department withdrew its recent report setting standards for the prosecution of monopolization offenses. The report was controversial from the sta... [from E-Commerce Times]
Jul 2@5:00am: In a dramatic repudiation of Bush administration policies, the Antitrust Division of the U.S. Justice department withdrew its recent report setting standards for the prosecution of monopolization offenses. The report was controversial from the sta... [from E-Commerce Times]
LinContEx.com was going to be “BlogRush done right”…
May 26@9:07pm: A little over a year and a half ago, when John Reese announced his BlogRush service, I thought “oh, c**p,” (that word isn’t “CaRP” :-) “one of the big boys beat me to my idea.” At the time, I’d begun working on a site that was going to be similar,... [from Alpha Gecko : Web Design]
May 26@9:07pm: A little over a year and a half ago, when John Reese announced his BlogRush service, I thought “oh, c**p,” (that word isn’t “CaRP” :-) “one of the big boys beat me to my idea.” At the time, I’d begun working on a site that was going to be similar,... [from Alpha Gecko : Web Design]
CaRP/WP for WordPress Adds RSS Widget Support
Oct 3@3:42pm: I just uploaded version 2.0 of CaRP/WP (an RSS plugin for WordPress) to my server. CaRP/WP works with CaRP to display RSS feed content, including Amazon.com affiliate feeds and YouTube videos, in the posts and pages of WordPress blogs. This versio... [from Alpha Gecko : Atom/RSS]
Oct 3@3:42pm: I just uploaded version 2.0 of CaRP/WP (an RSS plugin for WordPress) to my server. CaRP/WP works with CaRP to display RSS feed content, including Amazon.com affiliate feeds and YouTube videos, in the posts and pages of WordPress blogs. This versio... [from Alpha Gecko : Atom/RSS]
My Uber-Optimized Domain And Blog Names
Jul 23@2:15pm: Yesterday I started a new blog on a domain I’d been using mostly to redirect traffic to other sites. The domain name is “ToSeeMore.info”. The blog directory is “about”. It’s on a subdomain named “click”. So the URLs to the blog posts and categorie... [from Alpha Gecko : Web Design]
Jul 23@2:15pm: Yesterday I started a new blog on a domain I’d been using mostly to redirect traffic to other sites. The domain name is “ToSeeMore.info”. The blog directory is “about”. It’s on a subdomain named “click”. So the URLs to the blog posts and categorie... [from Alpha Gecko : Web Design]
Usage Examples:
Basic usage
NOTE: With PHP FTP versions before 1.1, the following code will not display error messages for certain types of connection failures. If you are using an older version, either upgrade to the current version or use the next code example.
<?php
require_once "PHPFTP.php";
$ftp = new PHPFTP();
// if the first argument to Connect is blank,
// PHPFTP will connect to the local host via 127.0.0.1
$result = $ftp->Connect('www.somewhere.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)";
// say Disconnect(0); to break the connection without explicitly logging out
$ftp->Disconnect();
}
?>
Display your own error messages
NOTE: With PHP FTP versions before 1.1, the show_connect_error option was not supported. If you are using an older version, either upgrade to the current version, or delete the line that sets show_connect_error.
<?php
require_once "PHPFTP.php";
$ftp = new PHPFTP();
$ftp->show_connect_error=0;
// if the first argument to Connect is blank,
// PHPFTP will connect to the local host via 127.0.0.1
$result = $ftp->Connect('www.somewhere.com','login name','password');
switch ($result) {
case 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)";
// say Disconnect(0); to break the connection without explicitly logging out
$ftp->Disconnect();
break;
case 1:
echo '[PHP FTP] Connect failed: Unable to open network connection';
break;
case 2:
echo '[PHP FTP] Connect failed: Unknown host';
break;
case 3:
echo '[PHP FTP] Connect failed: Login failed';
break;
case 4:
echo '[PHP FTP] Connect failed: Your PHP version does not support PHP FTP';
break;
}
?>