homepage Welcome to WebmasterWorld Guest from 54.204.127.191
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Can you append cookie/session info to a URL?
What would that look like?
freshfish




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

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

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

 

coopster




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

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




msg:1292378
 11:18 pm on Mar 3, 2005 (gmt 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 ;)

freshfish




msg:1292379
 4:39 am on Mar 4, 2005 (gmt 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.

Elixir




msg:1292380
 6:49 am on Mar 4, 2005 (gmt 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

freshfish




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

killroy




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

Why not just send the cookie over?

freshfish




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved