Untitled
unknown
plain_text
4 years ago
1.3 kB
5
Indexable
$URL = 'https://api-brokers.com/registration'; $post = array( 'firstName' => $_POST['firstname'] ? $_POST['firstname'] : rand(1000, 9999), 'lastName' => $_POST['lastname'] ? $_POST['lastname'] : rand(1000, 9999), 'email' => $_POST['email'], 'phone' => $_POST['phone'], 'phonecc' => "+1", 'password' => $_POST['password'], 'project' => "", 'lang' => "en", 'a' => 9365, 'o' => 26858, 's' => "|{$subid}|||", 'agreementBroker' => "on", ); $data_string = json_encode($post); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $URL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json', // 'X-Forwarded-For: ' . $_SERVER["HTTP_CF_CONNECTING_IP"], 'X-Forwarded-For: 192.206.151.131', //для теста с канадского айпи ) ); $response = curl_exec($ch); print_r($response); exit;
Editor is loading...