Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'http://52.233.158.172/change/api/hr/account/register';
- $ch = curl_init($url);
- $teamname = secure_data($_POST['teamname']);
- $password = secure_data($_POST['password']);
- $username = secure_data($_POST['username']);
- $surname = secure_data($_POST['surname']);
- $email = secure_data($_POST['email']);
- $data = array(
- 'Teamname' => $teamname,
- 'Password' => $password,
- 'name' => $username,
- 'surname' => $surname,
- 'mail' => $email
- );
- $payload = json_encode(array("user" => $data));
- curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $result = curl_exec($ch);
- curl_close($ch);
- echo "<pre>$result</pre>";
- $data = json_decode(file_get_contents('php://input'), true);
- echo '<pre>'.$data.'</pre>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement