Jump to content

PHP auto login


jmwalloh

Recommended Posts

Hi,

 

You could use cookies to keep the user logged in, you can see more descriptive information about cookies @ http://www.php.net/manual/en/function.setcookie.php

 

Not sure what you mean by download a file every 24hrs? 

Are you downloading to client or to the server?

What does this file contain and file type?

 

If downloading to the user, the user needs to be connected to the webpage before anything will download.

Link to comment
Share on other sites

Hi,

 

You could use cookies to keep the user logged in, you can see more descriptive information about cookies @ http://www.php.net/manual/en/function.setcookie.php

 

Not sure what you mean by download a file every 24hrs? 

Are you downloading to client or to the server?

What does this file contain and file type?

 

If downloading to the user, the user needs to be connected to the webpage before anything will download.

The URL for the site is https://www.23andme.com/you/download/ I need to download this zipped file to my machine on a daily basis at a specific time say 9PM. The zipped file contains a text file.

Link to comment
Share on other sites

You need a cron script which runs at the desired times. You also need an HTTP library like cURL to make the requests.

 

Your script first sends your credentials to the login page and gets back a session cookie. Then you request the file while including the session cookie. The manual will tell you how to use cURL.

 

Note that using automated scripts may violate the terms of use.

Link to comment
Share on other sites

Any suggestion will be highly appreciated.

 

Did you see that three people have already replied? So what exactly do you not understand about our suggestions?

 

How the URL looks like is irrelevant for the general logic. cURL doesn't care if the path is “/my_login_script.php” or “/my/login/script”.

Edited by Jacques1
Link to comment
Share on other sites

Guest
This topic is now 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.