[PHP] Logging Referer

2003-02-21 Thread Matt Honeycutt
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

RE: [PHP] Logging Referer

2003-02-21 Thread Matt Honeycutt
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

RE: [PHP] Re: including in shtml

2003-02-21 Thread Matt Honeycutt
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

RE: [PHP] Re: including in shtml

2003-02-21 Thread Matt Honeycutt
, 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

RE: [PHP] Displaying images

2003-02-22 Thread Matt Honeycutt
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

RE: [PHP] Help with Multiple Checkboxes

2003-02-23 Thread Matt Honeycutt
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

[PHP] Another Logging Question

2003-02-23 Thread Matt Honeycutt
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

RE: [PHP] Another Logging Question

2003-02-23 Thread Matt Honeycutt
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

RE: [PHP] Another Logging Question

2003-02-23 Thread 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

RE: [PHP] server hostname

2003-02-23 Thread Matt Honeycutt
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]

RE: [PHP] text file reading and overwrite

2003-02-24 Thread Matt Honeycutt
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

RE: [PHP] having php auto load a page

2003-02-24 Thread Matt Honeycutt
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

RE: [PHP] One more string question

2003-02-26 Thread Matt Honeycutt
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]

RE: [PHP] problem in writing into an html text file

2003-02-27 Thread Matt Honeycutt
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

RE: [PHP] re: strip comma from $value

2003-02-28 Thread Matt Honeycutt
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 ) {

RE: [PHP] re: strip comma from $value

2003-02-28 Thread Matt Honeycutt
: 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

RE: [PHP] re: strip comma from $value

2003-02-28 Thread Matt Honeycutt
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

[PHP] Getting Numerical Index of a Key

2003-03-03 Thread Matt Honeycutt
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

RE: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Matt Honeycutt
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

RE: [PHP] Getting Numerical Index of a Key

2003-03-03 Thread Matt Honeycutt
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