Hi all,
I'm working on adding some logging functionality to a PHP image counter
script that I wrote. The counter outputs an image representing the current
number of hits and is used via an img tag. After it displays the image,
the counter collects information about the user (browser version and
Yeah, I had thought about using JavaScript. I had hoped that there was
another way, but if there is, I can't figure it out.
---Matt
-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 8:37 PM
To: Matt Honeycutt; Php-General
Subject: Re: [PHP
If you figure out how to do this successfully, please share. I'm forced
to use SHTML for my error pages (404.shtml and whatnot), but I'd like to
get those to interact with PHP as well.
---Matt
-Original Message-
From: Hans Prins [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003
, February 21, 2003 11:45 PM
To: 'Matt Honeycutt'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: including in shtml
If you figure out how to do this successfully, please share. I'm
forced
to use SHTML for my error pages (404.shtml and whatnot), but I'd like
to
get those to interact with PHP as well.
Most
Robert,
The image functions do indeed work, check the PHP docs for more info:
http://www.php.net/manual/en/ref.image.php
However, your server must have the GD libraries installed and PHP must be
properly configured. The docs should be a good starting point if nothing
else.
---Matt
Yup, id is a valid attribute for virtually every HTML tag. I can't
remember for sure which W3C specification that was in, but you can refer
to most elements through JavaScript by using their ID's in both IE and
Netscape 6+.
---Matt
-Original Message-
From: John Taylor-Johnston
I'd like for my counter/logger to be fairly scalable, so I'm toying with two
possible implementation routes:
1. Have the counter dump visitor info to a text file, then run a cron job on
that nightly to process the data and perform a full analysis.
2. Have the counter dump the visitor info into a
as
it keeps me from having to even think about file locking issues.
---Matt
-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 23, 2003 5:12 PM
To: Matt Honeycutt; Php-General
Subject: Re: [PHP] Another Logging Question
on 24/02/03 3:30 AM, Matt Honeycutt
Yeah, I know, but I'd like this counter to provide that functionality
for those that don't have access to Apache's logging capabilities
(either because their hosts don't allow it or because of the platform
they're being hosted on).
At some point, I'd like to provide a toggle to have the counter
This information is quite easy to find in the PHP docs. You are looking
for $_SERVER['SERVER_NAME'], which is a predefined variable.
---Matt
-Original Message-
From: Michael P. Carel [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 23, 2003 8:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP]
I can't tell you anything about your problem without knowing what's
going on (error messages are helpful). As for overwriting a file, just
use: fopen($filename,w);
The w option tells it to open the file for writing and to truncate it
to zero-length.
---Matt, XPODesigns.com
-Original
Look up the header() function in the docs. Basically, you would do
this:
if($logged_in_ok)
header(Location: .$url_to_go_to);
There are some things to note when using header, so again, check the
docs before you use it.
---Matt, XPODesigns.com
-Original Message-
From: Antoine
Trying using stripslashes() on the string variable prior to displaying
it. That *might* not work for you, but I'd try that first.
---Matt
-Original Message-
From: Gregory Chagnon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 26, 2003 11:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP]
Check stripslashes(), I think that will help you.
---Matt
-Original Message-
From: Michael P. Carel [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 27, 2003 4:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] problem in writing into an html text file
this code add a backslashes in all
ereg_replace returns a string, regardless of whether or not any replacement
occured. If no replacement occurs, the original string is returned.
Additionally, it does not modify the original string, so you need to store
the string it returns:
foreach($numeric_array as $key = $value ) {
: Matt Honeycutt [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 11:56 AM
To: php
Subject: RE: [PHP] re: strip comma from $value
ereg_replace returns a string, regardless of whether or not any replacement
occured. If no replacement occurs, the original string is returned.
Additionally
I'm sorry, I missed a really big problem with what you're doing.
When you use foreach(), the value that it gives you (in your case, via the
$value variable) is not a reference to the array item, its a copy of it, so
modifying the copy doesn't modify your original array.
Use this (this should
Is there an easy way to get the numerical index of a text key for an
array? I don't see anything in the manual, but before I waste time
writing code to find this info, I thought I would double check here.
---Matt
everything up.
---Matt
-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 12:35 AM
To: Matt Honeycutt
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Getting Numerical Index of a Key
What makes you think it HAS a numerical index?
Matt Honeycutt wrote
To: Matt Honeycutt
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Getting Numerical Index of a Key
No, there's no easy way to do this. Just out of curiousity, why do you
want to do this anyway?
Matt Honeycutt wrote:
Because I created it with mysql_fetch_array(). I know for a fact that
both keys exist
20 matches
Mail list logo