You are here: Re: Mantain a variable through several scripts like global.asa variables in asp « PHP Programming Language « IT news, forums, messages
Re: Mantain a variable through several scripts like global.asa variables in asp

Posted by Chung Leong on 12/29/05 06:38

Zeppelin wrote:
> detect user's real ip
> load users ip table (this is my shared variable)
> send 60 equispaced items of the table to user (as body of http
> response)
> rotate ip's, loosing first item and adding the detected ip at the end
> end

Don't see a good way to do this other than to serialize an array, write
the string to a file, then read it back. Not a terribly scalable
solution, as disk write is relatively slow. But unless you are
anticipating a lot of cocurrent access, it's adequate.

Try the shared memory functions as suggested by others as well. I'm a
little skeptical, as you can't use shared memory safely without
synchronization objects, which as far as I know aren't available in
PHP.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация