Flickr Badges Open New Window jQuery way

I recently added a Flickr Badge to a site and really loved everything about it except that there was no way to have it open the photos in a new window when they were clicked
Flickr badge looked like the following
– Username

<div id="flickr_badge_wrapper">
<script type="text/javascript" src=""></script></div>

– Group

<div id="flickr_badge_wrapper">
<script type="text/javascript" src=""></script>

The following script would loop back through all of the links within the div id “flickr_badge_wrapper” and change their “target” property to “_blank”. Add it to footer.php before

jQuery("#flickr_badge_wrapper a").attr("target","_blank");

PHP Conditional statements to identify iPad or iPod or iPhone

This tutorial will show you how to detect iPad or iPod or iPhone using PHP
Devices which request content from your website (usually) pass a user agent string. This contains information such as its name, OS, browser version, and rendering engine. Apple’s gadgets pass the following user agents, although you may find subtle variations in the version numbers

iPad user agent

Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10

iPhone user agent

HTTP_USER_AGENT=Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.

iPhone user ageny

Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/3A101a Safari/419.3  

The following conditional statements can be used to identify iPad or iPod or iPhone

if (preg_match("/iP(od|hone|ad)/i", $_SERVER["HTTP_USER_AGENT"])) { ... }


if(strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod') || strstr($_SERVER['HTTP_USER_AGENT'],'iPad')) { }

How to disable phpinfo

The phpinfo() function is a very powerful one,  you can learn quite a lot about your PHP installation. Some server administrators may choose to disable the PHP function phpinfo() for security reasons, because it displays information which can be used to compromise the server that your site is running on. You can completely disable phpinfo(). First find the php.ini file :

php -i| grep php.ini

Open php.ini with VI or Pico.

#vi php.ini 

change the line that includes the disable_functions directive so that it says :

disable_functions = phpinfo

– If you have access to WHM, login to WHM. See Service Configuration on the Right Sidebar. Click PHP Configuration Editor. Click Switch to Advanced Mode. Find the disable_functions directive, add the following in that directive


– If you only have access to .htaccess, you can use the following In .htaccess, add a line that says

php_value disable_functions phpinfo

Note: disable phpinfo means that you cannot check PHP version with phpinfo()

How to check what PHP version running on Linux?

It’s very simple to check PHP version

1. PHP Info

You can use the following to yield PHP version number via Command Line

php -i


You can create a php file contain the following, upload it to your website


Note: if your sys admin disabled phpinfo, you cannot check what PHP version with phpinfo()
2. Short Info in SSH


You can use the following to yield PHP version number via Command Line

php -v


php -i | grep 'PHP Version'