Jump to content

Login & Authentication


hackalive

Recommended Posts

Ive put together a PHP/MySQLi login script for my site.

 

However I was wandering:

    1. Does Facebook use PHP Cookies or Sessions for their login? (Figured out my own answer :))

    2. How does FB set the Cookie/Session so that when I log into facebook.com I am also logged into developers.facebook.com

 

Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/260562-login-authentication/
Share on other sites

A cookie has both a domain and a path. If you set a cookie's domain to "domain.com", you will also see it on "sub.domain.com" but only if its path matches the URL. So set the domain as ".mydomain.com" and the path as "/", which means any path on any subdomain. They're two different things that work together.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.