Welcome Guest, Not a member yet? Register   Sign In
Invalid session token on request
#1

I've been using REQUEST  with Codeigniter 3 on my project.

what i want to achieve is to populate our data to this website . The site needs authentication before we could create or post the data.

here is my code

Code:
function submit_immi(){

$this->load->library(array('PHPRequests'));

$options = array(
       'auth' => new Requests_Auth_Basic(array('myusername', 'mypassword'))
   );      

   $response = Requests::post('https://online.immi.gov.au/lusc/login', array(), $options);      

   var_dump($response->body);
}

this is the result

Quote:string(5578) " ]> ImmiAccountLogin to ImmiAccountFields marked * must be completed.UsernamejoserespallPasswordLoginCancelI have forgotten my ImmiAccountusername or password Create an ImmiAccountCreate an ImmiAccount to access the Department of Immigration and Border Protection's online services.Create ImmiAccountAccessibilityCopyright & DisclaimerOnline SecurityPrivacy"

I've been approaching it with different method, when i viewed the source code and checked the form url, i noticed that it passess 2 arguments.

here is my code

Code:
function submit_immi(){
   $this->load->library(array('PHPRequests'));

   $data = array(
       '_2b0a0a0d0b0'  =>  'username',
       '_2b0a0a0d1b0'  =>  'password'
   );

   $response = Requests::get('https://online.immi.gov.au/lusc/login',array(),$data);

   preg_match_all('/value="([^\"]+)/',$response->body,$match);

   $wc_s = $match[1][0];
   $wc_t = $match[1][1];

   $response = Requests::post("https://online.immi.gov.au/lusc/login?wc_s=$wc_s&wc_t=$wc_t",array(),$data);

   var_dump($response->body);
}

this is the result

Quote:string(2362) " ]> Manage my ImmiAccount Invalid session token on request. Accessibility Copyright & Disclaimer Online Security Privacy "

Am i doing it wrong?

Can someone point me on the right path?

Thank you.
Reply


Messages In This Thread
Invalid session token on request - by z3r0nin3 - 06-21-2016, 10:27 PM
RE: Invalid session token on request - by PaulD - 06-22-2016, 04:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB