Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Get Cookies for Form Input

by Anonymous Monk
on Sep 16, 2010 at 03:44 UTC ( #860310=note: print w/replies, xml ) Need Help??

in reply to Get Cookies for Form Input

I'm sorry, it seems that my first message was a bit confusing. To clarify:

The first application is a PHP/PERL combination with cookies that comes from the PERL code. The second application is all PERL.

I want to get the data from the cookies and pass it to second application.

Replies are listed 'Best First'.
Re^2: Get Cookies for Form Input
by superfrink (Curate) on Sep 16, 2010 at 19:22 UTC
    Depending on the domain names in the applications' URLs the second application may be able to read the contents of the cookie set by the first application.

    If the first application runs at and the second application runs at then the second application will get the cookie data because the browser will send it via HTTP headers.

    If the applications are on different subdomains like and then you may have to update the code that creates the cookie to specify the cookie's domain be That will tell the browser to send the cookie data to both applications. Of course then will also get sent a copy of the cookie data when the browser visits it and that may not be desirable for privacy reasons.

    Update: ++Your Mother is right about the path. For some more cookie information visit

      This is not necessarily true. If the cookies contain path constraints and they differ, they will not be available to anything on different paths. And I'm not positive, been a long time since I had to do it, but I believe you have to set the domain to (leading dot) to make it available to subdomains.

      Thanks for information.

      Everything is coming and going from the same domain, only different sub-directories. The sessions are timed and clicking 'logout' will overwrite the cookies.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://860310]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-06-20 07:57 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.