Advertisement
Guest User

Untitled

a guest
Jan 24th, 2016
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.72 KB | None | 0 0
  1. <?php
  2. $username = $_GET['user'];
  3. $password = $_GET['pass'];
  4. $loginUrl = 'https://onenetsamoobsluha.vodafone.cz/onsc/login/wicket:interface/:0:form::IFormSubmitListener::';
  5.  
  6. $ch = curl_init();
  7.  
  8. curl_setopt($ch, CURLOPT_URL, $loginUrl);
  9. curl_setopt($ch, CURLOPT_POST, 1);
  10. curl_setopt($ch, CURLOPT_POSTFIELDS, 'login='.$username.'&password='.$password.'');
  11. curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
  12. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  13.  
  14. $output = curl_exec($ch);
  15.  
  16. curl_setopt($ch, CURLOPT_URL, 'https://onenetsamoobsluha.vodafone.cz/onsc/services/data/data-tariffs');
  17. $content = curl_exec($ch);
  18. $content = str_replace("../../", "https://onenetsamoobsluha.vodafone.cz/onsc/", $content);
  19.  
  20. echo $content;
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement