09-04-2011, 06:12 AM
Just reads the IP address and source I came from??
Anyway, at least the song is pretty
Anyway, at least the song is pretty
Mini PHP Project
|
09-04-2011, 06:12 AM
Just reads the IP address and source I came from??
Anyway, at least the song is pretty
09-04-2011, 07:00 AM
And the time aswell, but still need to sort that out.
09-04-2011, 07:10 AM
09-04-2011, 12:17 PM
(This post was last modified: 09-04-2011, 12:18 PM by FritoBandito.)
Actually, The time() function in PHP grabs the time of the server it is hosted on. In this case, it is showing 3:15 pm for me because the server is hosted in the eastern time zone while I am in the Central time zone. It is a good start to learn PHP.
Getting the persons IP address is also quite simple. 2 Lines of code can simple get your IP address and display it: Code: <?php Basic as that. But i do like the skull head btw (09-04-2011, 12:17 PM)FritoBandito Wrote: Actually, The time() function in PHP grabs the time of the server it is hosted on. In this case, it is showing 3:15 pm for me because the server is hosted in the eastern time zone while I am in the Central time zone. It is a good start to learn PHP. The "skull head" is the troll face, how didn't you know that? Also you can cut that down to one line as I did. PHP Code: <?php
09-04-2011, 01:41 PM
You should make the clock count by the seconds. Instead of having to refresh the page to see the time change.
09-04-2011, 01:50 PM
(09-04-2011, 01:37 PM)BreShiE Wrote: The "skull head" is the troll face, how didn't you know that? lol my bad. Wasn't paying that much attention... And that works too, but what if you want to use the $ip variable later on? :O. Like....to make a logger on who comes on your website. (09-04-2011, 01:41 PM)alabama Wrote: You should make the clock count by the seconds. Instead of having to refresh the page to see the time change. Or use javascript .
09-04-2011, 04:23 PM
09-04-2011, 05:13 PM
Really simple.
I'm learning PHP and this is similar to my first project. I made an IP logging script which added it to a mysql database.
09-04-2011, 05:18 PM
(09-04-2011, 05:13 PM).edit Wrote: Really simple. I think everyone starts with an IP logging script. Not a bad thing, really; if you make a half-decent one, you can learn quite a bit. |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers | tk-hassan | 0 | 936 |
07-27-2020, 11:26 PM Last Post: tk-hassan |
|
My PHP Project, V.03 [UPDATE] | ChromeWolf | 3 | 1,138 |
11-17-2011, 12:59 PM Last Post: HF~Legend |
|
PHP Video Tutorials (PHP For Beginners) | Eleqtriq | 4 | 3,660 |
10-10-2011, 01:00 PM Last Post: Greyersting |
|
PHP Forum Software Project | Saint Michael | 1 | 986 |
12-12-2010, 10:01 PM Last Post: Saint Michael |