Forum Moderators: coopster

Message Too Old, No Replies

Explanation of php in the address bar please!

         

Chutney

11:39 am on Mar 2, 2004 (gmt 0)

10+ Year Member



Hi everyone,

Firstly, I apologise if this is a really ridiculous question worthy of a huge "D'oh!" but I'm new to PHP and this is just one area I cannot understand/find anything out about.

I am in the early stages of building a PHP site at the moment and I notice in every php site I visit I see something like this:

[comopanyname.com...]

My question is, could someone explain for me what the php?sid=randon number means and how it works in terms of site design?

Many thanks

davidpbrown

11:46 am on Mar 2, 2004 (gmt 0)

10+ Year Member



I'm no expert, but would expect 'sid' is 'session id' number, which might help track your preferences/choices while you visit.
cf server side cookie+.

file.php?xyz=123 or indeed any file processed as php, eg. file.html?xyz=123 allows a variable to be passed to the php code -> dynamic output.

Chutney

12:32 pm on Mar 2, 2004 (gmt 0)

10+ Year Member



Thanks for your reply!

So this is a number string unique to me? Even though I'm not signed up to the site (and hence, have no preferences etc.) but just browsing?

I guess this question sort of follows on then; in html, the address bar would read :

[mycompany.com...]

signifying the linked page 'about us' etc., but in php, I keep seeing the above mentioned random number string immediately after the .com/ and nothing that signifies a subsection or 'about us', and that is initally what I thought the number string was (naming links numerically) but is it not?

Yep, colour me confused! LOL!

trillianjedi

12:36 pm on Mar 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes it's a Session ID. It's a (poor) alternative to cookies - so that the server knows that it's you.

Google and other bots can choke to death on these. If you have to use them, make sure they are not served to crawlers.

It's nothing to do with navigation.

TJ

coopster

12:58 pm on Mar 2, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can find more regarding "SID" on PHP's Session Handling Functions [php.net] page.