Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- function generateRandomString($length = 10) {
- $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
- $charactersLength = strlen($characters);
- $randomString = '';
- for ($i = 0; $i < $length; $i++) {
- $randomString .= $characters[rand(0, $charactersLength - 1)];
- }
- return $randomString;
- }
- echo 'Enter Referral Code : ';
- $ref = trim(fgets(STDIN));
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, 'http://www.getapsychologist.com/ceviroynaparakaza/sc.php');
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, '{
- "name": "'.generateRandomString(16).'",
- "email": "'.generateRandomString(10).'@gmail.com",
- "password": "anjir123",
- "ref": "'.$ref.'",
- "cihazkimlik": "1D189879CEA73E11"
- }');
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
- $headers = array();
- $headers[] = 'Content-Type: multipart/form-data';
- $headers[] = 'Host: www.getapsychologist.com';
- $headers[] = 'Content-Disposition: /form-data="name,email,password,ref,cihazkimlik"';
- $headers[] = 'User-Agent: Dalvik/2.1.0 (Linux; U; Android 8.1.0; SM-G610F Build/M1AJQ)';
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch);
- if (curl_errno($ch)) {
- echo 'Error:' . curl_error($ch);
- }
- curl_close ($ch);
- $json = json_decode($result);
- if($json->success == 0){
- echo $json->error->message;
- die();
- }
- echo $json->ref." Berhasil ";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement