In the first part of this series I showed how you could get the country of a visitor via his IP address. Now with this precious information, I’ll show you how to map the visitor visually on the world map using Google Maps.
Sample preview.
You must sign up for a Google Maps API key if you [...]
When I started implementing mod_rewrite in websites I had a problem in PHP as how to make a SEO friendly URL. All tutorials were geared towards how to implement mod_rewrite, about modifying .htaccess files, but none treated how to make the urls friendly with dynamic content. For example I have a news section which are [...]
In this post I’ll show you how to create an expanding/collapsing menu like Slashdot left menu used to be, using the YUI library and Dav Glass YUI effects widget.
Preview of the script we are going to build.
The HTML markup for our menu is :
<div id="menu"><h1 id="menu-title">Menu</h1><div id="menu-links"><ul><li>Home</li><li>About</li><li>CSS</li></ul></div></div>
We use 2 div tags, one for holding the [...]
Since I had some problems with YUI slider, I decided to write a YUI-based numeric stepper that allows users to select values within a predefined range.
To instantiate the widget include the following files :
<!– CSS –>
<link rel="stylesheet" type="text/css" href="stepper/stepper.css" />
<!– Dependencies –>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<!– Stepper source file –>
<script type="text/javascript" src="stepper/stepper-min.js"></script>
Then place your stepper in your [...]
In this short post I’ll show you how to geolocate your visitors with PHP. First of all let’s have a look at what you’ll need :
PEAR GeoIP
MaxMind GeoLite Country
Installing PEAR GeoIP
Using your console or using the command prompt type :
pear install http://download.pear.php.net/package/Net_GeoIP-1.0.0RC1.tgz
Obtaining MaxMind GeoLite Country
The database can be downloaded freely here. Download it and put [...]
You want to have
in your XSL stylesheet but you’re getting an error, just put these few lines of code at the top, before the
<xsl:stylesheet…>
tag :
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY AElig "Æ">
<!ENTITY AMP "&#38;">
<!ENTITY Aacute "Á">
<!ENTITY Acirc "Â">
<!ENTITY Agrave "À">
<!ENTITY Alpha "Α">
<!ENTITY Aring "Å">
<!ENTITY Atilde "Ã">
<!ENTITY Auml "Ä">
<!ENTITY Beta "Β">
<!ENTITY COPY "©">
<!ENTITY Ccedil "Ç">
<!ENTITY [...]
Nowadays many people call themselves PHP programmers / web developers as soon as they know a bit of Frontpage or using Dreamweaver to generate the code for them. But are they really good web developers? Here’s my top 10 characteristics of good web developers, feel free to comment.
1. Ability to hand code
Instead of using an [...]