 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPBuilder.com: Transfer Data via Multiple Protocols with Libcurl
by Chris Cornutt September 19, 2011 @ 12:03:23
On PHPBuilder.com today there's a new tutorial showing how to use libcurl to communicate with multiple protocols like FTP, HTTP, HTTPS, SMTP and STMPS. The libcurl library that can be compiled in or installed as a shared module in your PHP install to provide enhanced networking abilities.
As I wrote in my PHP multithreading with cURL article, the libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. PHP supports the libcurl library which allows you to connect and communicate to many different types of servers with many different types of protocols.
The tutorial focuses on two different types of connections (well, four really) - FTP/FTPS and HTTP/HTTPS - and how to transfer data across each. Some code is included to create a (procedural) tool to send an uploaded file to a remote site.
voice your opinion now!
tutorial libcurl ftp ftps http https networking multiple protocol
PHP and Me Blog: Use Phing to Update your SVN-Version-Controlled Website Automatically, Through FTP
by Chris Cornutt June 20, 2011 @ 11:57:15
On the "PHP and Me" blog there's a new entry from Pinpin Bysma showing how to use the PHP-based deployment tool Phing to update your production website via an FTP connection, automated by a Phing build.
If you're working on a PHP project, like with any other project, probably comes a time when you need to "build a new release," e.g. update the production web site with the latest version of the code. And doing the whole thing manually isn't the most efficient way to get things done, especially if you're lazy, or have to do that every once in a while, over a long period of time. [...] Obviously if updating the site itself could be done without FTP but through a simple svn switch, things would be easier. Still, Phing would allow to make things easier just as nicely. It could for example still be used to create the new tag, trigger the switch, etc
He introduces the process by showing a basic Phing build file that uses the PEAR VersionControl_SVN component to get the latest from the repository and push it to another directory. There was one thing that he wanted to do that the default SVN task couldn't - export the difference between two tags. To make this happen, he had to extend Phing and make a new task - SvnExportDiff. He includes the code for this new task and an updated build file to show it all in use - complete with the FtpDeploy to push the code live.
voice your opinion now!
phing tutorial svn website deploy ftp custom task
NetTuts.com: How to Work with PHP and FTP
by Chris Cornutt May 12, 2011 @ 08:05:21
On NetTuts.com there's a new article stepping you through what you'll need to know about using FTP in PHP, including a basic useful and expandable class.
It's always important to first outline exactly what functionality your class should include. In our case: connecting to a server, create a folder on the server, upload a file, change directory, retrieving the directory listing and downloading a file.
They first look at what FTP is and then how to set up the class that includes some simple logging, connection handling and how to call the class with a username, password and hostname. The class lets you create a remote directory, upload a file, view a list of remote files and downloading a selected file. Full source for the class is available as a download.
voice your opinion now!
ftp tutorial class
Justin's Blog: An ftp server written in PHP
by Chris Cornutt May 19, 2009 @ 10:40:30
Justin has written up a quick look at a FTP server that's been written entirely in PHP - nanoFTP.
nanoFTPd is an ftp daemon written in php. as of version 4.2.0, php supports the command-line interface (stable since 4.3.0), which nanoFTPd relies on. nanoFTPd is modular, so it's easy to add custom modules and other stuff, like different database interfaces (currently supports mysql and postgresql).
The server allows for a lot of the usual FTP functionality - uploads, downloads, user authentication, logging, etc. It works with PHP 4.2 and above and is pretty simple to install.
voice your opinion now!
server nanoftp ftp
Community News: phpanywhere (Online PHP IDE)
by Chris Cornutt April 29, 2009 @ 11:12:18
The phpanywhere site boasts itself as "the easiest way to bring work with you anywhere you go - without bringing anything". The free (still in beta) service offers online PHP editing through a web browser interface.
PHPanywhere is a web based free Integrated Development Environment or IDE for the PHP language, in other words it is an application that gives developers all the code editing capabilities they need to develop PHP applications online. It includes a real-time syntax code editor with support for all web formats and a powerful FTP editor.
You can add in FTP servers and pull files directly from them to edit and upload back over. You can also use the project sharing to allow others to see the current state of your code (real-time collaboration is "coming soon"). You can see screenshots of the editor interface, setting up FTP sites and modifying permissions for the files.
voice your opinion now!
phpanywhere online ide edit ftp share
DeveloperTutorials.com: Port Scanning and Service Status Checking in PHP
by Chris Cornutt April 08, 2009 @ 08:49:21
On the DeveloperTutorials.com site today there's a new tutorial showing the creation of a port scanner with PHP - a tool that, given some of the familiar ports that services (like web or email servers) run on, can check to see if they're responding.
While building web applications, it's often important to keep an eye on the other services running on your server. Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.
Their example makes a socket connection to the remote port to see if there's a valid hookup. The wrap this inside a loop for ports 1 through 1000 to see what ports are open and responding on your local machine (doing this on a remote machine is just asking for trouble).
Their full example defines some of the common ports in an array and loops to check on their status. It sets out a base you can build on top of with things like their suggestions - logging scan results, repoting downtime and running a service-specific task.
voice your opinion now!
port scan fsockopen socket http ftp pop3 check connection
Buildmeister.com: Automating the PHP deployment process with Phing, dbdeploy and FTP
by Chris Cornutt April 03, 2009 @ 11:17:41
On the Buildmeister blog there's an article detailing a setup for an automated project deployment process using Phing, dbdeploy and FTP.
A "well defined" build and deployment process (supported by a number of key tools or scripts) can often help reduce errors and increase the quality of delivered applications. In comparison with other languages, the PHP community has been somewhat slow in implementing build, deployment, code inspection and testing tools, however there are now a sufficient number available that have reached maturity.
They walk through what each tool is, how to configure them to work with each other and even on different environments (different development areas). Some configuration files and settings are included. The database deployment (with dbdeploy) is slightly different but can still be hooked into Phing and include a logging system (to a database table) for any updates.
voice your opinion now!
deployment phing dbdeploy ftp configure process automation
Juozas Kaziukenas's Blog: Using Phing to sync files with shared hosting
by Chris Cornutt March 02, 2009 @ 13:41:12
Juozas Kaziukenas has a new post to his blog today looking at using Phing to keep files in sync on a shared hosting, FTP only kind of environment.
Today I was trying to use [Phing] in shared hosting server, but as you will see, Phing can't do a lot of it's functionality without direct access to server (over shh for example). [...] Things get worse, when you try to sync files in shared hosting environment, where only FTP is available. [...] Code in the hole some months ago posted solution which uses Net_FTP (FTP functionality wrapper) package to upload files to server. I decided to try given solution, so I modified it to download source code from SVN first and then upload them.
His Phing configuration sets up the application, defining the source directory, the files to push, the FTP connection to make and pushes the files over out of an svn export. He has a slightly different solution (no code/config for this one) that would grab the last revision value from the remote server and only push out the files have have changed since then.
voice your opinion now!
phing sync files shared hosting ftp subversion svn source configuration
Developer Tutorials Blog: Port Scanning and Service Status Checking in PHP
by Chris Cornutt June 10, 2008 @ 08:46:08
The Developer Tutorials blog has posted a new tutorial covering how to scan ports and checking a remote service's status with PHP.
Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.
They show how to check a remote instance (a socket open with a timeout) and how to run through a list of ports, looping from one to one-thousand and running an fsockopen on each. They make a sample script to show these two combined - a simple page that loops through the common protocols (HTTP, FTP, SSH, etc) and checks to see if the remote machine is running something on that port.
voice your opinion now!
port scan service status check fsockopen http ftp ssh
|
Community Events
Don't see your event here? Let us know!
|