Guest User

Untitled

a guest
Nov 7th, 2018
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.02 KB | None | 0 0
  1. <?php
  2.  
  3. $user = [
  4.     'user_email' => 'mon@email.com',
  5.     'user_ip' => '127.1.2.3'
  6. ];
  7.  
  8. $url = 'https://www.proche2moi.com/gateway/billing.php?ida=1360&id_product=29&offer=dating2&rebill=0&comfrom=catcher60&main_id_cat=50&tracker=&user_email=&user_ip_address=&user_is_male=&user_nickname=&user_password=&user_birthdate=&user_age=&user_age_range=&user_city=&user_search_age_range=&user_search_male=&user_search_female=';
  9. $ch = curl_init();
  10. curl_setopt($ch, CURLOPT_URL, $url);
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  12. curl_setopt($ch, CURLOPT_POST, true);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, $user);
  14. curl_setopt($ch, CURLOPT_HTTPHEADER, [
  15.     'Accept: application/json',
  16.     sprintf('X-Forwarded-For: %s', $user['user_ip']),
  17. ]);
  18. $data = curl_exec($ch);
  19. $json = json_decode($data);
  20.  
  21. if (!$json && json_last_error())
  22.     throw new RuntimeException(json_last_error_msg());
  23.  
  24. elseif ($json && !empty($json->error))
  25.     throw new RuntimeException($json->error);
  26.  
  27. $redirect_url = $json->url;
  28. var_dump($redirect_url);
  29.  
  30. ?>
Add Comment
Please, Sign In to add comment