><><>>>>>!!!@@@ - Fotolog de pepe

Pepeland, Peru

25/7/2008
 

WIZARD!

The script begins with call to session_start(), which tells PHP to create a blank file in your sessions directory.

If you don&#039;t have a dedicated session directory because you&#039;re hosted on a shared server, it isn&#039;t a good idea to rely on the default session&#039;s directory. Since all of the servers&#039; users share the same sessions directory, you could end up counting files that aren&#039;t coming your visitors. To solve this problem, simply add this line at the top of your script:

session_save_path("/path/to/custom/directory");

After this, we define the timeframe (in minutes) that we allow users to be idle for:

define("MAX_IDLE_TIME", 3);

Essentially, if a visitor does not request a new page from the server within this timeframe (in this case 180 seconds), his session file will be ignored and not added to the visitor count.

Hold on. You might remember me saying, "built in garbage collector" earlier, and wondering why this line is necessary. There is, in fact, a built in garbage collector. The only problem with it is that by default, php.ini sets the random chance for the collector to be run at 1%. For smaller sites that don&#039;t get much traffic, this could lead to inaccurate results because the script would count old sessions more often than not.

Todas las fotos de pepe →


17/6/2021

13/6/2021

11/6/2021

10/6/2021

25/7/2008

17/7/2008

4/7/2008

11/6/2008

Amigos/Favoritos de pepe →

Libro de visitas:

Ingresá a tu cuenta para firmar el libro de visitas

Todas las fotos
de pepe


17/6/2021

13/6/2021

11/6/2021

10/6/2021

25/7/2008

17/7/2008

4/7/2008

11/6/2008
Más fotos
🔝  Top
🎲  Random

© 2008-2024 · Cacholog.com

Términos & Privacidad     Acerca de nosotros