This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
NDFJay's profile picture

[Question] Roaming PHP Login

Started by NDFJay, 19 December 2012 - 11:16 AM
NDFJay #1
Posted 19 December 2012 - 12:16 PM
Right so im trying to making roaming accounts for a program that allows the user to create an account then login anywhere from any computer and get files native to their login details…

the program is an email client that sends emails to a given email address (not CC emails)
the email client its self works and i can send emails but I need to set up the login script and thats where im stuck

Im trying to do this with PHP using the http_post() funtion, so far I have made my database and the PHP login scripts (web server side)

my question is how do I create the sessions and connect the two in computercraft?

and links to anywhere that can help me will be highly appreciated

thanks
~NDFJay
Lyqyd #2
Posted 19 December 2012 - 02:01 PM
Sessions require cookies, yes? If so, this is not currently possible, to the best of my knowledge. You'd have to use something other than sessions in that case.
NDFJay #3
Posted 19 December 2012 - 02:09 PM
Sessions require cookies, yes? If so, this is not currently possible, to the best of my knowledge. You'd have to use something other than sessions in that case.

thats fine I can emulate sessions with send specific info to the PHP site with ever page update but the main thing I need to figure out is how to set up the login, that was the reason for the post.

I need information on sending a username and password to a PHP script that checks the SQL database, but I need computercraft to be able to check if the login details were correct and if they were then login in to the program otherwise print invalid details…

so basically your standard login check but online… through PHP
Lyqyd #4
Posted 19 December 2012 - 02:11 PM
Try looking through the pastebin program to see how it transports data.
NDFJay #5
Posted 19 December 2012 - 03:25 PM
Try looking through the pastebin program to see how it transports data.

Dude… i love you, thats a brilliant idea! I actually cant believe I didnt think of that!?!


TO PASTEBIN!

thanks ^_^/>