php - cURL and SimpleBrowser -


I have a script that allows me to enter live Xbox using Simple Bros.C. Anytime a browser detector on Xbox LIVE takes me after logging in to an empty page, there is an empty form that needs to be submitted. But this form is not shown on my browser, so can not easily find it to present it. The creator of the script says that I need to use CRL, how can I use curl with simple divider?

Here's the script.

  need_once ('simpletest / browser.php'); $ Browser = new SimpleBrowser (); $ Browser- & gt; Get ('http://live.xbox.com/en-US/profile/profile.aspx?pp=0&gamerTag='); $ Browser- & gt; Setfield ('email address', 'blah@blah.com'); $ Browser- & gt; Setfield ('password', 'blah'); $ Browser- & gt; ClickSubmitByName ('SI'); $ Browser- & gt; SubmitFormById ('fmHF'); $ Browser- & gt; Return getContent ();  

I can only assist you with sending the form using curls. View the source of the form and get the form action url from

and and put it in $ link > Each form field in the string with the variable field name and value is as follows: < / P>
  $ postdata = 'EmailAdress =blah@blah.com& Password = blah ';  

The rest of the script will look like this:

  $ curl_obj = curl_init (); Curl_setopt ($ curl_obj, CURLOPT_URL, $ link); Curl_setopt ($ curl_obj, CURLOPT_TIMEOUT, 20); Curl_setopt ($ curl_obj, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ curl_obj, CURLOPT_COOKIESESSION, true); Curl_setopt ($ curl_obj, CURLOPT_COOKIEFILE, "cookiefile"); Curl_setopt ($ curl_obj, CURLOPT_COOKIEJAR, "cookiefile"); Curl_setopt ($ curl_obj, CURLOPT_FOLLOWLOCATION, 1); Curl_setopt ($ curl_obj, CURLOPT_POST, 1); Curl_setopt ($ curl_obj, CURLOPT_POSTFIELDS, $ postData); $ Response = curl_exec ($ curl_obj); Page content will return in  $ response  variable  

or simply return curl_exec ($ curl_obj);


Comments