Archive for PHP

Download And Search Multiple Pages Using PHP

August 2, 2011 | 0 Comments

Here is a simple way to loop through a list of URLs, download the page and search the contents for a string.

Read more…

Filed Under: PHP

Backup MySQL Databases to Amazon S3 Using PHP

May 16, 2011 | 0 Comments

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 s3cmd and upload it to your server. Installation is straight forward. The PHP code is simple:

Read more…

Filed Under: MySQL, PHP

Creating a Delicious Submission Link in PHP

March 10, 2011 | 0 Comments

DeliciousCreating 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 type it or copy/paste it.

Read more…

Filed Under: PHP

Creating a Digg Submission Link in PHP

March 7, 2011 | 0 Comments

DiggCreating 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 requires the visitor to manually click the submit button to prevent spamming.

Read more…

Filed Under: PHP

Customizing the AddThis WordPress Plugin

February 28, 2011 | 0 Comments

AddThis 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, e.g. Digg), AddThis plugin only displays 4. So I modified it by adding a few lines of code to make it display more services and thought others might want to do the same.

Read more…

Filed Under: PHP, WordPress

2 Ways to Redirect URLs in PHP

May 3, 2010 | 0 Comments

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 one. Affiliate marketers use URL redirection to point to their products. This way when the product they are marketing is no longer sold they point their URLs to another similar product and keep their landing pages functional. There are two ways to redirect URLs in PHP:

Read more…

Filed Under: PHP

Displaying the Number of Visits in a WordPress Blog Post

April 22, 2010 | 9 Comments

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 easiest to get the page view count from. So after some googling I found the best way to do so is to use the WordPress.com Stats Helper plugin and two lines of PHP code to display the number.

Read more…

Filed Under: PHP, WordPress