RSS

Archive | Tutorials RSS feed for this section

How To Show A Users IP Address - PHP

7. November 2008

3 Comments

Showing a users IP address is very easy. We use a function called getenv ( ) to do so. Here is the code: <?php echo getenv('REMOTE_ADDR'); ?> Simple as that… Heres a demo please wait...Rating: 9.1/10 (7 votes cast)

Continue reading...

Get Email Notification Everytime Google Crawls Your Site

7. November 2008

1 Comment

Ever wanted to know how often Google crawls your site? This tutorial is going to show you how to make your website send you an email everytime Google visits your site. 1 2 3 4 5 6 7 <?php if(strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false) { $email = 'you@domain.com'; mail($email,'Googlebot Alert', 'Googlebot has crawled your page: '.$_SERVER['REQUEST_URI']); } ?> Just paste that code in somewhere on your site. Change $email to your [...]

Continue reading...

Simple Random Advert Rotator Tutorial - PHP

5. November 2008

1 Comment

In this tutorial Im going to show you how to make a random advert rotator. The way we are going to do it is through an array to define our adverts then use an array function to shuffle the array. So the first thing we need to create the array… $adverts=array('<a href="http://www.website.com"><img src="image.gif" alt="" /></a>'=&gt;'1','<a href="http://www.website.com"><img src="image.gif" alt="" [...]

Continue reading...