Back when I first changed the format of my page so that I had the same list of links down the side of every page, I quickly discovered that it was a pain to have to go through 5 or 6 pages of HTML/PHP adding new links here and there. I eventually came up with […]
Not sure why I haven't posted this before. (or maybe I did and I'm just drawing a blank). Get the IP of the user: if ($_SERVER['HTTP_X_FORWARD_FOR']) { $ip = $_SERVER['HTTP_X_FORWARD_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } I've also seen it done this way too but for some reason I was under the impression the […]
Will asked about adjusting the date php displays to account for the fact that the server may not be in the same location as you. (I don't think this solved his problem with displaying the actual timezone differently – but thought it was worth putting up anyway…) I'm sure there are other ways (if you […]
To move a browser window to a specific location on the users screen: window.moveTo(x,y); replacing "x,y" with pixel coordinates. More info here, where they also have the below which will give you the users screen width, height: screen.widthscreen.height Also, to resize the browser window: window.resize(width,height) Now, before you go all crazy on me – I'm […]
(non blog related post) Needed to use this php function: strchr (alias to strstr). I had a field that had a person's full name (first and last). 99.999% of the time, the first name and last name were seperated by a space (no Mr. or Mrs. in there) and I needed a script that assumed […]
Comments Off on Get first (part of) name