Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $user = [
- 'user_email' => 'mon@email.com',
- 'user_ip' => '127.1.2.3'
- ];
- $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=';
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $user);
- curl_setopt($ch, CURLOPT_HTTPHEADER, [
- 'Accept: application/json',
- sprintf('X-Forwarded-For: %s', $user['user_ip']),
- ]);
- $data = curl_exec($ch);
- $json = json_decode($data);
- if (!$json && json_last_error())
- throw new RuntimeException(json_last_error_msg());
- elseif ($json && !empty($json->error))
- throw new RuntimeException($json->error);
- $redirect_url = $json->url;
- var_dump($redirect_url);
- ?>
Add Comment
Please, Sign In to add comment