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";
//}
?>