Re: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Radovan Radic
Yes, database is much better solution, but i wanted to make very simple script for counter. Thanks to all Radovan "Jill Ramonsky" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Yes, Jochem's right. > > One thing though, Radovan. If your script WRITES TO the fi

Re: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Luis Ferro
counters... 1. make an 1px * 1px transparent image 2. make a php page that delivers that image always depending on the exact url of it... and stores the result on the required record... 3. make a rotine that generates those url and that stores the reference in a database... 4. make a rotine that

RE: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Svensson, B.A.T. (HKG)
t;. > -Original Message- > From: J Veenhuijsen [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 30, 2003 3:00 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Re: Counter problems! > > > A little trick could be to place couter.txt outside of the docroot. >

Re: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread J Veenhuijsen
I only set full rights on the counter.txt file (windows system) I dont know if it works the same way on other OS'es Full rightn the docroot means browser can open the file as Http://url/counter.txt This is prevented by placing couter.txt outside the docroot. Or am I wrong here? Jochem Jill R

Re: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread J Veenhuijsen
A little trick could be to place couter.txt outside of the docroot. I placed couter.txt as c:\couter.txt and that works. Jochem Jill Ramonsky wrote: Yes, Jochem's right. One thing though, Radovan. If your script WRITES TO the file "counter.txt" then I assume that script's directory must give w

RE: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Jill . Ramonsky
Yes, Jochem's right. One thing though, Radovan. If your script WRITES TO the file "counter.txt" then I assume that script's directory must give write permission to the whole world. That is a very dangerous thing to do. There would be nothing to stop a hacker from saving arbitrary binary (or PHP) c

RE: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Jill . Ramonsky
For reasons of scope, you may need to first use $count outside the braces. This would give you... "; ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Jill . Ramonsky
Try this... "; ?> -Original Message- From: Radovan Radic [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 1:06 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Re: Counter problems! Yes, but what if you refresh the page? Or type in the address bar index.php and press enter, i thin

RE: [PHP-WIN] Re: Counter problems!

2003-01-30 Thread Svensson, B.A.T. (HKG)
03 5:51 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] Re: Counter problems! > > > So, is there some "perfect" counter? Or there is some simple solution? > I tried this (index.php) > session_start(); > if (!isset($QUERY_STRING)) > header(&qu

Re: [PHP-WIN] Re: Counter problems!

2003-01-29 Thread Radovan Radic
So, is there some "perfect" counter? Or there is some simple solution? I tried this (index.php) This is helping when page is refreshed, but when someone types location in the address bar: http://mysite.com/index.php counter gets +1! Or this is normal behaviour? Someone opened door again... "J.Ve

Re: [PHP-WIN] Re: Counter problems!

2003-01-29 Thread J.Veenhuijsen
You've got a point there!!! Jochem B.A.T. Svensson wrote: There are some potential pitfalls involving: CASE 1: Multi user systems: You will see the same IP for all of the users on that system. CASE 2: Firewalls You might only see the firewalls IP# for each and every user behind it. CA

RE: [PHP-WIN] Re: Counter problems!

2003-01-29 Thread Svensson, B.A.T. (HKG)
There are some potential pitfalls involving: CASE 1: Multi user systems: You will see the same IP for all of the users on that system. CASE 2: Firewalls You might only see the firewalls IP# for each and every user behind it. CASE 3: Dynamically assigned IP# IP# might dynamically be assigned to d