Welcome to WebmasterWorld Guest from 54.167.5.15

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Can you append cookie/session info to a URL?

What would that look like?

     

freshfish

9:53 pm on Mar 3, 2005 (gmt 0)

10+ Year Member



What would a URL that passes along session information look like?

i.e. domain.com?cfid=2222....

coopster

11:18 pm on Mar 3, 2005 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Sure, that's quite possible. It all depends on what the programmer has decided to call the session. It may also be passed along in a cookie or hidden <form> value, but you did ask about the url here I guess so we'll stick to that for now...

The default session id in PHP is PHPSESSID [php.net], so the url might look something like

http://www.example.com/PHPSESSID=als098asdf098gasj23k34l5lj23....

or something along those lines ;)

Why do you ask? Is there something in particular you are trying to figure out?

jatar_k

11:18 pm on Mar 3, 2005 (gmt 0)

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member



would look pretty much like that.

the standard php one looks something like

example.com?PHPSESSID=1b56f3fd797a22cb716022b05f5db34d

which happens to be my active session id from a site right now

<added>coop has those quick fingers ;)

freshfish

4:39 am on Mar 4, 2005 (gmt 0)

10+ Year Member



Well, I have a script that needs to access some info on a site that has cookies. There are pages on the site that you cannot access if you do not have the cookies....so naturally the script has to somehow extract session ifno and append it to the url...or so I presume.

Elixir

6:49 am on Mar 4, 2005 (gmt 0)

10+ Year Member



Is the destination page outside of your site in which case the bog standard PHP cookie handling doesn't help? You might need to encode the arguments on the URL such as
example.html?arg1=value1&arg2=value2

freshfish

12:49 am on Mar 6, 2005 (gmt 0)

10+ Year Member



Yes, the pages are on a different site...I have u/p access to the site and am creating a script to automate some of the work that I already do there.

So, could the script mimic a session? I.e. look like a real surfer so that it can go about extracting info, etc?

Thanks

killroy

3:01 am on Mar 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Why not just send the cookie over?

freshfish

6:48 pm on Mar 6, 2005 (gmt 0)

10+ Year Member



killroy...not sure what you meant by "just send the cookie over"...could you elaborate on that?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month