| |||||||
| Coding / Scripting / Programming Discussions on all manner of coding and scripting. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) | |
| Hey guys, Just wondering because i am re-desgining my businesses website and just wondering if you know how to export certint data from the output of a php file, So an example would be: < ? php print ("Your IP Address is: "); echo getenv ('REMOTE_ADDR'); ? > The clients would translate into something like this: Your IP Address is: ***.***.***.*** But then record somehow back on to the server? i was thinking if you could record into a text file in a special format but i have tryed searching the internet and asking freinds but nobody has any ideas, mabee putting into mySQL but i currently dont know how to use php and mySQL. Cheers | ||
| | | |
| Sponsored Links |
| | #2 (permalink) | |
| I'm not exactly sure what you're trying to do here. If you just want to write to a file, php can do that easily. It looks like maybe you're wanting to log IP Addresses. MySQL would be the best way to go, instead of logging to a text file. However, here's a quick snippet that would log visitor IP addresses: PHP Code: | ||
| | | |
| | #4 (permalink) | |
| No problem, glad it worked for ya. I still recommend using MySQL to track visitors though, since this could cause problems with high traffic. The problem is when 2 people hit the site at the same time. 2 Instances of the script will run at the same time, and one will get a file sharing error when it tries to open the log file (because its already open with the other instance). For low traffic though, it should work okay. | ||
| | | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ars Technica // AOL data leak may give data retention bill new life | Gizmo | Ars Technica RSS | 0 | 13-August-06 04:00 PM |
| Exporting Opera Bookmarks to I.E | jinx© | Internet / Network Tweaks | 0 | 17-May-04 10:30 PM |
| Exporting Trillian buddy lists? | Jonny English | Other PC Problem / Help | 5 | 03-February-04 07:31 PM |
| exporting ut2k3 models to lightwave? | Cibressus | Anything Goes | 0 | 18-August-03 07:39 PM |