Login using cURL in HTTPS website
https://accounts.sling.com
Show message
Join up (it's free!) whether you're just starting out or you're crazy advanced. Get tips from people who know what they're talking about, without being treated like the playground smelly kid. Because seriously, your school classes didn't teach you anything you wanted to know.

Posted 06 May 2012 - 02:22 PM (#1)
Posted 06 May 2012 - 04:09 PM (#2)
Posted 06 May 2012 - 09:58 PM (#3)
$email = 'mail@inbox.com'; $pass = 'goeshere'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://accounts.sling.com/accounts/sling/start?next=http%3A%2F%2Faccounts.sling.com%2Faccounts%2Fmember%2Fprofile&flow=default&lang=ar&l=slingbox&policyCode=MAS&context=DEFAULT_SLINGBOX'); curl_setopt($ch, CURLOPT_POSTFIELDS,'emailAddress='.urlencode($email).'&password='.urlencode($pass).'&login=LOGIN'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"); $page = curl_exec($ch); echo $page;
Posted 07 May 2012 - 07:05 AM (#4)
Posted 28 May 2012 - 08:34 AM (#6)
<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', '1');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://accounts.sling.com/accounts/sling/login/loginForm");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/test.cookie'); // replace this with /tmp or something like that
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, true);
$data = array(
'emailAddress' => 'mail@email.com',
'password' => 'your_password',
'login' => 'LOGIN',
'sessionFlow' => 'default',
'sessionRedirectUrl' => 'http://accounts.sling.com/accounts/member/profile'
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
echo $output; // you should see your profile page
?>
This post has been edited by acronym: 28 May 2012 - 08:35 AM
Posted 03 June 2012 - 01:36 PM (#7)
/accounts/css/member__v31731.css
Posted 06 June 2012 - 02:13 PM (#9)
ta6ish, on 03 June 2012 - 01:36 PM, said:
/accounts/css/member__v31731.css
<base href ="http://accounts.sling.com/" />