|  | 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] |