Link to home
Start Free TrialLog in
Avatar of ItsMe
ItsMe

asked on

IP based shopping cart

hi ! i've developed an shopping system, wgich tracks the user by his ip. now i have a big problem: WHAT TO DO IF THE USER IS BEHIND A PROXY ??? please help me ! any comments, suggestions ?

regards
ItsMe
Avatar of kawin
kawin

How about cookies?
Avatar of ItsMe

ASKER

Hi kawin !
How do I set/read a cookie with perl (100 pts for code)? do cookies work with each system ?

regards
ItsMe
They work for people that accept cookies, people who don't accept cookies they do not work for.
Avatar of ItsMe

ASKER

and wht about the diffrent operating systems ? does win/ns and unix/ns use the same syntax for cookies ? i heared the opposite. can i set a cookie if the cgi is not on the server where my site is ?

regards
ItsMe

Please send me a source which sets a cookie including "Test" and which has a sub routine to read the cookie.
ASKER CERTIFIED SOLUTION
Avatar of ventolin
ventolin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ItsMe

ASKER

Thanks for your answer. Currently I'm stressed, I'll try it in the next days



regards
ItsMe
Avatar of ItsMe

ASKER

Hi ventolin !
I got a problem. I can't set the cookies. I think this could be because my domain is routed to http://other-servers'-ip-adress/plw/cgi-bin
Do you know how to solve this ? My directory has no IP-Adress.

regards
ItsMe
not sure i understand your situation... what do you mean your "domain is routed to http://other-servers'-ip-adress/plw/cgi-bin"?  are you setting your cookie on one machine and trying to retrieve it from another?
Avatar of ItsMe

ASKER

my domain www.anyserver.de is routed to http://212.223.56.6/cgi-bin/plw/anyserver/

I'm not able to set a cookies. Perhaps because domain=>'.anyserver.de' isn't valid when it is routed ?
Because you are using two different machines, the server issuing the cookie must be a member of the domain that it tries to set in the cookie. That is, a server called www.anyserver.de cannot set a cookie for 212.223.56.6, because 212.223.56.6 is not part of the www.anyserver.de domain.

You could utilize the poor implementation of cookies in 90% of browsers to work around it, but it itsn't good practice:

http://www.google.com/search?q=cache:homepages.paradise.net.nz/~glineham/cookiemonster.html