A Simple Port Scanner in PHP

  • 2012-07-17
  •   PHP
Here is a simple port scanner written in PHP. It checks if a port is accessible by trying to connect to it using PHP's fsockopen function. The first foreach loop goes through the port numbers …

Managing Application Settings in PHP

There are multiple ways to save application settings/configurations in PHP. You can save them in INI, XML or PHP files as well as a database table. I prefer a combination of the latter two; saving …

Download And Search Multiple Pages Using PHP

  • 2011-08-02
  •   PHP
Here is a simple way to loop through a list of URLs, download the page and search the contents for a string. The script starts by checking if the post variable $_POST['urls'] is set. If …

Backup MySQL Databases to Amazon S3 Using PHP

With a few lines of PHP code and S3tool's s3cmd command-line tool you can backup your MySQL databases automatically to Amazon's S3. To use this script you'll need SSH access to your server. First download …

Creating a Delicious Submission Link in PHP

  • 2011-03-10
  •   PHP
Creating a Delicious (del.icio.us) submission link is similar to Digg's, with the exception of the page title that can be sent to Delicious, which is not required, but you'll save the users from having to …

Creating a Digg Submission Link in PHP

  • 2011-03-07
  •   PHP
Creating a Digg submission link in PHP is easy since all the parameters Digg expects are included in the URL. Digg like most other social bookmarking tools does not allow complete automation of submissions. It …

Customizing the AddThis WordPress Plugin

My favorite WordPress plugin for bookmarking/sharing is AddThis. It looks good and provides comprehensive statistics. But unlike Shareaholic's SexyBookmarks plugin, which allows you to display any number of the available services (bookmarking or sharing sites, …

2 Ways to Redirect URLs in PHP

  • 2010-05-03
  •   PHP
The ability to redirect URLs in PHP can be very handy. A common use of redirects is when a page has become obsolete and you would like to redirect the user to a more current …

Displaying the Number of Visits in a WordPress Blog Post

I thought it would be a good idea to show how many visits a blog post had since it was published. One of the web tracking tools I use is WordPress.com Stats, and it's the …

How to Create a Page For Your Tags in WordPress

To display all the tags in a blog in page a plugin that runs PHP code in pages should be installed. I prefer Exec-PHP (http://bluesome.net/post/2005/08/18/50/) because its easy to use (you just type the PHP …