By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

Login with curl into OWA (outlook web access)

P: 1
Hello I'm trying to loging into OWA with curl but i have time out error.
I copy this code:
Expand|Select|Wrap|Line Numbers
  1. $ch = curl_init();
  2. curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
  3. curl_setopt($ch, CURLOPT_URL,"https://webmail.com/exchange");
  4. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  5. ob_start();      // Prevent output
  6. curl_exec ($ch);
  7. ob_end_clean();  // End preventing output
  8. curl_close ($ch);
  9. unset($ch);
  10.  
  11. $ch = curl_init();
  12. curl_setopt($ch, CURLOPT_POST, 1);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, "flags=0&forcedownlevel=0&trusted=0&username=myusernam&password=mypassword&isUtf8=1");
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  15. curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
  16. curl_setopt($ch, CURLOPT_URL,"https://webmail.com/exchange");
  17. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  18. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  19. $result = curl_exec ($ch);
  20. echo $result;
  21. curl_close ($ch);
  22.  
I have this output:
Expand|Select|Wrap|Line Numbers
  1. <HTML><SCRIPT>if (parent.navbar != null) parent.location = self.location;else self.location = self.location;</SCRIPT><BODY>440 Login Timeout</BODY></HTML>
With http headers i have this attachment when I login

Thank you!!!!
Attached Files
File Type: txt capture.txt (50.3 KB, 1223 views)
Dec 22 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.