Checking if you are on an iPhone. If this text sticks, you might want to enable javascript.
To detect iPhone users on your sites, you can do so client-side or server-side.

Client-side (javascript):

	        if (navigator.userAgent.indexOf('iPhone') != -1) {
		   /* iPhone user */
		}
	

Server-side (example is PHP):

	        if (stristr($_SERVER['HTTP_USER_AGENT'],'iPhone')) {
		    /* iPhone user */
		}
	
For sites that use an MVC coding pattern where the programming logic code is separate from the template, the following example is useful:
	        if (stristr($_SERVER['HTTP_USER_AGENT'],'iPhone')) {
		    $template = 'home/iphone.html';
		}
		else {
		    $template = 'home/index.html';
		}
	

Thanks to Jose D. Lopez for the PHP tips.