Comments

  1. Ilshat:

    Thank you Ryan! Exactly what I was looking for. Simple and clear.

    February 16, 2010 at 11:59 pm |
  2. when I am logged in gmail using php to fetch the contacts from the gmail account for my website — website removed — gmail is alerting the account holder that your account is accessed using unkown access type

    How to solve this problem?

    August 28, 2010 at 11:52 pm |
  3. Thanks for the code :D It was very helpful.

    Still I’m wondering about something. Could it be possible to connect with CURL and stay connected? I know I’m not very clear :p what I mean is if it’s possible to login with CURL through PHP and then open a new firefox browser window then go on logedinonly.php and still being loged in on the logedinonly.php page?

    January 19, 2011 at 10:24 am |
  4. @maxcmoi, I do not think you can do this. CURL sets the cookie for your server and not for your browser. search for “same origin” rule about cookies

    February 10, 2011 at 4:41 pm |
  5. tolga:

    thanks, exactly what i was looking for.

    December 2, 2011 at 10:24 am |
  6. WARNING!!!

    NEVER use $_SERVER[“PHP_SELF”] in a form like that. Or at least don’t do it without escaping it. You are leaving yourself wide open to XSS attacks with that sort of code.

    Preferably either leave it blank, or reroute to an absolute link.

    April 9, 2012 at 12:04 pm |

Leave a Reply

You must be logged in to post a comment.