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
ItsMeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

regards
ItsMe
0
olthoffCommented:
They work for people that accept cookies, people who don't accept cookies they do not work for.
0
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

ItsMeAuthor Commented:
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.
0
ventolinCommented:
http://stein.cshl.org/WWW/software/CGI/cgi_docs.html#cookies

The interface to HTTP cookies is the cookie() method:

    $cookie = $query->cookie(-name=>'sessionID',
                             -value=>'xyzzy',
                             -expires=>'+1h',
                             -path=>'/cgi-bin/database',
                             -domain=>'.capricorn.org',
                             -secure=>1);
    print $query->header(-cookie=>$cookie);

To retrieve a cookie, request it by name by calling cookie() method without the -value parameter:

        use CGI;
        $query = new CGI;
        %answers = $query->cookie('answers');
        # $query->cookie(-name=>'answers') works too!

To retrieve the names of all cookies passed to your script, call cookie() without any parameters. This allows you to iterate
through all cookies:

        foreach $name ($query->cookie()) {
            print $query->cookie($name);
        }
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ItsMeAuthor Commented:
Thanks for your answer. Currently I'm stressed, I'll try it in the next days



regards
ItsMe
0
ItsMeAuthor Commented:
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
0
ventolinCommented:
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?
0
ItsMeAuthor Commented:
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 ?
0
ventolinCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
E-Commerce

From novice to tech pro — start learning today.