![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Php script line break..
Ok i found this script that shows referrer logs for traffic you send to it..
<?php $myFile = "./data.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); fwrite($fh,"nReferer: "); fwrite($fh, ($_SERVER['HTTP_REFERER']) ); fwrite($fh,", "); fwrite($fh, ($_SERVER['HTTP_USER_AGENT']) ); fwrite($fh,", "); fwrite($fh, $_SERVER['REMOTE_ADDR']); fwrite($fh,", "); fwrite($fh, date('l jS of F Y h:i:s A') ); fclose($fh); ?> Anyone of making it seperate each new one and put it in a diff line.. right now it just jumbles em up..
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
The Original NoJob
Join Date: Feb 2004
Location: Jerzzey
Posts: 3,682
|
If you want to pay I can have one of my progammers on bench create a solution for you. If so , hit me on icq.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Aug 2007
Posts: 128
|
PHP Code:
__________________
230-699 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
thanks drocd..
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Oct 2002
Posts: 6,780
|
Will the script lag if a lot of hits r sent?
I mean i dont know how reliable it is to write to a text file every time someone hits the page.
__________________
_________________ I am the best ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Yes, Disk I/O will be a drag whore if you're getting a lot of traffic to it.
If you dont want to be scouring/parsing apache logs, hit me up on ICQ - I've just the (free) things that is right up your street....
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
why aren't you storing this stuff in mysql? The problem with what you have now is that there are no file locks (flock), so you're going to be getting into a whole lotta mess with those kind of file writes with traffic.
Anyway, in answer to your original question, a line break is \n. *always* in within double quotes, never single eg fwrite($fh, $_SERVER['REMOTE_ADDR'] . "\n");
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |