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 Jerry Stuckle on 12/28/05 15:37

Zeppelin wrote:
>>There is usually more than one way to skin a cat. If you give us some
>>details on what the code does, we might be able to suggest an
>>alternative--and perhaps superior--solution.
>
>
> Ok, really simple:
>
> 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
>
> I suppose it would be more effective if we used a dedicated mini-server
> for this simple script or write it in another language (bash?) and
> redirect the requests of this service with apache to it. But I thought
> it would be simplier using php.
>

Won't work. Detecting the user's real ip only works if they are
connecting directly to you or using a proxy which forwards the real IP
address. Most proxies, especially corporate ones, are set up to not
forward internal ip addresses. All you'll get is the proxy address -
which may be shared by multiple users (as is the case in my company).

Additionally, may large corporations and some hosting companies (i.e.
AOL) have redundant proxies. It's entirely possible for two requests
from the same user to go through two different proxies.

How would you handle these cases?


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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