Link To Full Story: webhostinghelpguy.inmotionhosting.com
An article that details all the uses of PHP would be as long as the New York City phonebook, and about as exciting to read. And while we have tutorials on PHP planned for the future, we thought we’d start everyone off with six fun and easy PHP tricks you can try right now, no matter what your familiarity with the language is.
1. Referrals
This simple example shows the user how they got to your site.
$referer = $_SERVER['HTTP_REFERER'];
echo "You reached this site via " . $referer;
See It In Action: You reached this site via http://www.dzone.com/links/rss/php_tricks_for_beginners.html
Since a user knowing how they got to your site isn’t particularly useful, you need to combine the above script with something, such as a unique page for users who come to your site from a particular location. For example, the script below would send visitors who found your site through Twitter to one page, while all others would be redirected to another. This script, just FYI, needs to go at the very top of the page you’re building.
if (strlen(strstr($_SERVER["HTTP_REFERER"],"twitter"))>0) {
header ('Location: http://' . $_SERVER['HTTP_HOST'] . '/from_twitter.html');
} else {
header ('Location: http://' . $_SERVER['HTTP_HOST'] . '/not_from_twitter.html');
}
Link To Full Story: net.tutsplus.com
Requirements
To complete this tutorial, you'll need the following:
Introduction to PhoneGap
PhoneGap is an open-source framework that can turn any web app into a native app for iPhone, BlackBerry and Android. It pulls off
this trick by running your web code in a UIWebView, an embedded instance of Safari without the
toolbars and buttons of the standalone Safari app. PhoneGap then extends this basic functionality by mapping features of the
iPhone SDK to JavaScript objects you can call in your web code, so you can easily add features like GPS, camera, contacts, vibration,
SQLLite and accelerometer support. And when you're ready to distribute your app, PhoneGap 0.80 is Apple-approved!
Included in the PhoneGap distribution is everything you need to build and run an iPhone app. The included XCode project is bundled
with a sample code showing how to use many of the native features, and all the supporting files necessary to compile the app and
run it in the iPhone Simulator or on your phone.
Link To Full Story: www.joeyrivera.com
Zend Framework 1.10.0 is out and a comment was posted on my blog that lead me to creating this new post. I’m going to focus more on Zend_Paginator and Zend_Rest_Client to access Twitters API since I’ve already created a post on Zend_Cache. Normally, I would use Zend_Service_Twitter to access the twitter service but it still seems to require authentication to retrieve a users timeline where only protected users should require authentication.
Zend_Paginator
Zend_Paginator from the Zend Framework site:
Zend_Paginator is a flexible component for paginating collections of data and presenting that data to users.
Zend_Paginator automatically creates pagination for you by setting up a few parameters and passing it an array of data. What is pagination, if you have ever gone to Google and searched for anything, usually you’ll see something like the following at the bottom of the search results page:

See the numbers and the text links, this is called pagination. So much data exists for the particular search that it wouldn’t make sense to display it all in one page. It would cause large amounts of scrolling down to view, the load time of the page would be affected, so we rather show fewer results and give our users the option of viewing more by clicking on the pagination links.
To demonstrate how to use Zend_Paginator I created a sample Zend Framework 1.10.0 application. This application grabs my last 50 tweets using the Twitter API and displays them 10 at a time using Zend_Paginator. I use Zend_Cache to cache my twitter data so I don’t have to spend time accessing their api every time – I’m sure they would appreciate it.
Link To Full Story: www.thebitsource.com
The Bitsource conducted a review of the two cloud computing platforms, Rackspace Cloud Servers and Amazon Elastic Compute Cloud (EC2), to get a general idea of overall system performance. Included in the tests were pure computing power (CPU), and raw disk I/O throughput. Using a consistent testing methodology across most instance sizes over a two-month time span (a painstaking process requiring lots of patience) has resulted in the following comparison of CPU performance, disk performance and cost between the two platforms.
We hope that this evaluation will save the reader some effort by answering questions about how the two platforms compare in terms of time, power, efficiency and cost. The purpose of this article is to answer a simple question: How do the two platforms stack up against each other in terms of disk and CPU efficiency?
Link To Full Story: css.dzone.com
In this
video you can see Mestrallet demonstrate the following GateIn functions:
- Provide a simple text file with a list of addresses, deploy it on GateIn WebDAV drive
- Build with the online IDE a REST API on the cloud (using Groovy and the JSR 311 specification) that reads the content of that file and exposes it as a REST service with a simple click
- Consume that REST service within a Gadget and use the Google maps API to render a map that points to the address from the file
Wednesday, January 27, 2010
Link To Full Story: www.guardian.co.uk
World government data revealed
Data, data, data. There's loads of it out there and more coming your way as governments open their statistics vaults around the world.
First the US with data.gov, then Australia and New Zealand followed suit. Now it's the UK's turn with data.gov.uk.
Wednesday, January 27, 2010
Link To Full Story: Google Webmaster Central Blog
Shared by JohnH
Did you know that Google acquired ReCaptcha?
http://poptech.org/popcasts/luis_von_ahn_harnesses_brainpower
Webmaster Level: All
If you allow users to publish content on your website, from
leaving comments to
creating user profiles, you’ll likely see spammers attempt to take advantage of these mechanisms to generate traffic to their own sites. Having this spammy content on your site isn't fun for anyone. Users may be subjected to annoying advertisements directing them to low-quality or dangerous sites containing scams or malware. And you as a webmaster may be hosting content that violates a search engine's
quality guidelines, which can harm your site's standing in search results.
There are ways to handle this abuse, such as moderating comments and reviewing new user accounts, but there is often so much spam created that it can become impossible to keep up with. Spam can easily get to this unmanageable level because most spam isn’t created manually by a human spammer. Instead, spammers use computer programs called “bots” to automatically fill out web forms to create spam, and these bots can generate spam much faster than a human can review it.
To level the playing field, you can take steps to make sure that only humans can interact with potentially spammable features of your website. One way to determine which of your visitors are human is by using a CAPTCHA , which stands for "completely automated public Turing test to tell computers and humans apart." A typical CAPTCHA contains an image of distorted letters which humans can read, but are not easily understood by computers. Here's an example:

You can easily take advantage of this technology on your own site by using
reCAPTCHA, a free service owned by Google. One unique aspect of reCAPTCHA is that data collected from the service is used to improve the process of scanning text, such as from books or newspapers. By using reCAPTCHA, you're not only protecting your site from spammers; you're helping to digitize the world's books.
Luis Von Ahn, one reCAPTCHA's co-founders, gives more details about how the service works in the video below:
If you’d like to implement reCAPTCHA for free on your own site, you can
sign up here.
Plugins are available for easy installation on popular applications and programming environments such as WordPress and PHP.
Posted by Michael Wyszomierski, Search Quality Team
Tuesday, January 26, 2010
Link To Full Story: www.catswhocode.com
In this tutorial, I’m using the Thematic theme framework, a GPL licenced theme brought to you by Ian Stewart. Thematic is in my opinion very powerful and optimized. Therefore, you may be interested in taking a look at other WordPress frameworks as well, such as Hybrid, Headway, Thesis or WP Framework.
Creating the child theme
Right now, you should know what a Theme Framework is and why you should use them. But enough theory for now, let’s get ready to create our own child theme for Thematic.
Download Thematic
Of course, the first thing to do is to download the Thematic Theme Framework. Once finished, unzip the file on your hard drive.
If you want, you can activate Thematic and take a look at your blog. Thematic can be used as a parent theme, or in standalone mode. Without a child theme, Thematic is ready to use and features a really gorgeous typography. There’s no images or even colors, so that you can create your child theme and make Thematic fit your needs, either in its look or functionality.

Tuesday, January 26, 2010
Link To Full Story: css.dzone.com

SpamAssassin has a wide array of spam-killing weapons at its disposal. It uses DNS and checksum based spam detection,
Bayesian filtering, external programs, and online databases. Spam scoring determines if a message is marked 'ham' or 'spam' (a negative overall score is spam and positive overall is ham). The program is written in Perl and it can run as a standalone application, a subprogram of another application, or as a client that communicates with a daemon. Even if SpamAssassin is used as a system-wide filter, it can still be configured by each user for their own personal mailbox preferences.
Tuesday, January 26, 2010
Link To Full Story: net.tutsplus.com
Cron Jobs are used for scheduling tasks to run on the server. They're most commonly used for automating system maintenance or administration. However, they are also relevant to web application development. There are many situations when a web application may need certain tasks to run periodically. Today we are going to explore the fundamentals of Cron Jobs.

Burak Guzel is a full time PHP Web Developer living in Arizona, originally from Istanbul, Turkey. He has a bachelors degree in Computer Science and Engineering from The Ohio State University. He has over 8 years of experience with PHP and MySQL. You can read more of his articles on his website at PHPandStuff.com and follow him on Twitter here.
Definitions
First let's familiarize ourselves with the terms related to this subject.
"Cron" is a time-based job scheduler in Unix-like operating systems (Linux, FreeBSD, Mac OS etc...). And these jobs or tasks are referred to as "Cron Jobs".
There is a cron "daemon" that runs on these systems. A daemon is a program that runs in the background all the time, usually initiated by the system. This cron daemon is responsible for launching these cron jobs on schedule.
The schedule resides in a configuration file named "crontab". That's where all the tasks and their timers are listed.
Why Use Cron Jobs?
Server admins have been using cron jobs for a long time. But since the target audience of this article is web developers, let's look at a few use cases of cron jobs that are relevant in this area:
- If you have a membership site, where accounts have expiration dates, you can schedule cron jobs to regularly deactivate or delete accounts that are past their expiration dates.
- You can send out daily newsletter e-mails.
- If you have summary tables (or materialized views) in your database, they can be regularly updated with a cron job. For example you may store every web page hit in a table, but another summary table may contain daily traffic summaries.
- You can expire and erase cached data files in a certain interval.
- You can auto-check your website content for broken links and have a report e-mailed to yourself regularly.
- You can schedule long-running tasks to run from a command line script, rather than running it from a web script. Like encoding videos, or sending out mass e-mails.
- You can even perform something as simple as fetching your most recent Tweets, to be cached in a text file.