Welcome to WebmasterWorld Guest from 54.145.117.60

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Can you append cookie/session info to a URL?

What would that look like?

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

Junior Member

10+ Year Member

joined:Aug 19, 2004
posts:95
votes: 0


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

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

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

Administrator

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

joined:July 31, 2003
posts:12548
votes: 2


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?

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

Administrator

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

joined:July 24, 2001
posts:15756
votes: 0


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 ;)

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

Junior Member

10+ Year Member

joined:Aug 19, 2004
posts:95
votes: 0


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.
6:49 am on Mar 4, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 24, 2004
posts:154
votes: 0


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
12:49 am on Mar 6, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 19, 2004
posts:95
votes: 0


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

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

Senior Member from MT 

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 1, 2003
posts:1843
votes: 0


Why not just send the cookie over?
6:48 pm on Mar 6, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 19, 2004
posts:95
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members