log2

log2

Joined
Dec 01, 2004
Occupation
God
Location
Ontario, Canada

PHP Code Snippets

log2 created a Page  -  May 16, 2005
4,413 

This isn't a big fancy login system, but someone asked me to write them a small loging system and when I was done, I realized that it wasn't that big so I decided to put it on here...

log2 created a Page  -  May 14, 2005
489 

This is the ever popular Petals Around the Rose game converted to PHP!! it's fairly long, but it only took about 30 minutes to code... I used numbers rather than pictures because I can't post pictures!

  4 Threads   PHP  
log2 created a Page  -  May 08, 2005
5,823 

This changes the colour of the background depending on the day of the week! Just place this after the (/head tag) and before the (body) tag (which you will have to take out)

  3 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
259 

This is an update on Hawkee's e-mail form, it's smaller, at least I think it is, than his and it also looks slicker in a browser, you can fit it in mostly any place! It may be smaller but his is less confusing, I must admit that

  1 Thread   PHP  
log2 created a Page  -  Dec 20, 2004
422 

This is the best little snippet you'll ever see on this site, maybe. . . depends on how many years this site will be around, it's going pretty good right now, but anyway this snippet will make it so when you select the colour(color if you're American which I'm not) out of a drop down menu, it will change all the tables, and if you know how to make a web site then you know all you use are tables so..

  5 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
458 

an easy little guestbook that can be viewed and edited! All you need to do is make a file called comment.txt... This part only writes into the guestbook, it does not, i repeat does not display it in anyway! and you also have to set the CHMOD to 777

  6 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
7,060 

This will show a random link when someone comes to your page

  5 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
381 

This is similar to the last one I wrote, but this one tells the person how many lines are in a text file instead of how many files are in a directory. This can be useful on an informational site to forwarn or inform the reader of how to prepare for a long, or short read

 Respond   PHP  
log2 created a Page  -  Dec 20, 2004
1,057 

This is another simple script, it tells you how many files there are in the specified directory, It can be used if you have a user system and you have downloadable files you can tell people how many files there are :)

 Respond   PHP  
log2 created a Page  -  Dec 20, 2004
1,253 

This is a basic script that is needed by any PHP scripter if they are using MySQL in any script:

  3 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
358 

This is a more complex counter than the last one I wrote, this one will tell you any error and it will tell you when it's been updated, all you have to do is make a file counter.txt

 Respond   PHP  
log2 created a Page  -  Dec 20, 2004
363 

This script will log every person who comes on to your site, if you put this on every page with a new file for each page then you could tell what every person did on your site unless they download something. Right now the file is admin.txt, so you will have to create that file too.

  1 Thread   PHP  
log2 created a Page  -  Dec 20, 2004

When you go to google and it says, it took 0.000123 seconds to find 123134134 items, and you think to yourself, wow I wish I could see how long it takes to load my page, well now you can! this is another straight forward little piece of code.

  5 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
7,545 

All this does is show the person on the site what their IP address is, it's not extremely useful, but it's extremely easy and comes in handy if you're logging each visitor! you can tell them their IP address and then tell them their being logged, that's just a security feature to not get hacked, or at least try to scare them off.

  3 Threads   PHP  
log2 created a Page  -  Dec 20, 2004
2,657 

This will add a counter to your site, all you have to do is make a file called count.dat (lower case, most are case sensitive about file names) and place the following code where you want the counter to appear :) easy as pie. . . mmmm pie.

  5 Threads   PHP  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.