scriptygoddess

Archive for the ‘Script snippet’ Category

11 May, 2003

Another way to manage links

Posted by: Jennifer In: Script snippet

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 […]

18 Mar, 2003

Get users IP with PHP

Posted by: Jennifer In: Script snippet

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 […]

12 Mar, 2003

Adjusting the date with php

Posted by: Jennifer In: Script snippet

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 […]

27 Feb, 2003

Move and resize browser window…

Posted by: Jennifer In: Script snippet

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 […]

26 Feb, 2003

Get first (part of) name

Posted by: Jennifer In: Script snippet

(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

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements