Jump to content

jmwalloh

New Members
  • Posts

    6
  • Joined

  • Last visited

jmwalloh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi jazzman, so if i were to include this suggestion on my cURL script below, will this work out <?php error_reporting(E_ALL); $username = 'myusername'; $password = 'mypassword'; $loginUrl = 'https://www.23andme.com/user/signin/'; //init curl $ch = curl_init(); //Set the URL to work with curl_setopt($ch, CURLOPT_URL, $loginUrl); // ENABLE HTTP POST curl_setopt($ch, CURLOPT_POST, 1); //Set the post parameters curl_setopt($ch, CURLOPT_POSTFIELDS, 'username='.$username.'&password='.$password.'&redirect=&source_flow=&__source_node__=start&__context__=IhEcX2ivtGzK30cuk0eODNsNcX7FHNZJWPaEIYtdQT12OIx41EALfWWl4eTEIKDMJ-tQ9LhFIui8U0dpV0sBIipLq5jLnCJmworArmgt_QkbbfLczY_T8_6WR7-B4QxZRn8zxfTWKKvZI8nyQaVHmA%3D%3D&__form__=login&redirect=&button=Log+In'); //Handle cookies for the login curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $store = curl_exec($ch); if($store !=true){ die('Error: "' . curl_error($ch) . '" - Code: ' . curl_errno($ch)); }else{ //the login is now done and you can continue to get the protected content. //set the URL to the protected file curl_setopt($ch, CURLOPT_URL, 'https://www.23andme.com/you/download'); //execute the request $content = curl_exec($ch); echo $content; } //if($store == true){ //echo "Login success"; //the login is now done and you can continue to get the //protected content. //set the URL to the protected file //curl_setopt($ch, CURLOPT_URL, 'http://www.example.com/protected/download.zip'); //execute the request //$content = curl_exec($ch); //save the data to disk //file_put_contents('~/download.zip', $content); //}else{ // echo"Login fails......"; // echo "Last known error code: " . curl_errno($ch) . "\n"; // echo "Last known error text: " . curl_error($ch) . "\n"; //} ?>
  2. Hi, that i have done but the challenge is to get the scritp name that handle this form and whether the username and password when being sent, what are the exact name tied to them e.g "username or uname or user" as well as the password that is sent whether "password or pass or pword" etc as they form the query string to the server.
  3. Hi, am trying to use cURL to automatically login to https.23andme.com but when i examine the form's action part, it doesnt reveal the exact script that handles the form. The action part is like "method="post" action="/user/signin/". Any suggestions??
  4. Hi, i need to create a PHP script that logs in to a certain website [23andme.com]and downloads a given file. I have seen some article on this like http://www.binarytid...-with-curl-php/ but my problem is to deal with one having an action like =====> action ="/user/signin/" Any suggestion will be highly appreciated. Thanks
  5. 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.
  6. Hi, i need to code a script that login to a website after supplying a username and password, then downloads a file after every 24 hrs. Any suggestions ??
×
×
  • 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.