Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post">
- <dl>
- <dt>Country code: (example: 31)</dt>
- <dd><input type="text" name="cc" value="31" /></dd>
- <dt>Phonenumber: (example: +31612345678)</dt>
- <dd><input type="text" name="n" value="+316" /></dd>
- <dt>New status:</dt>
- <dd><input type="text" name="m" /></dd>
- <dd><input type="submit" value="Change!" /></dd>
- </dl>
- </form>
- <?php
- if ($_SERVER['REQUEST_METHOD'] === 'POST') {
- $url = 'https://s.whatsapp.net/client/iphone/u.php';
- $fields = array(
- 'cc' => urlencode($_POST['cc']),
- 'me' => urlencode($_POST['n']),
- 's' => urlencode(stripslashes(utf8_decode($_POST['m'])))
- );
- //url-ify the data for the POST
- foreach ($fields as $key=>$value) {
- $fields_string .= $key . '=' . $value . '&';
- }
- rtrim($fields_string, '&');
- //open connection
- $ch = curl_init();
- //set the url, number of POST vars, POST data
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_POST, count($fields));
- curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
- curl_setopt($ch, CURLOPT_USERAGENT, "WhatsApp/2.6.7 iPhone_OS/5.0.1 Device/Unknown_(iPhone4,1)");
- //execute post
- $result = curl_exec($ch);
- //close connection
- curl_close($ch);
- echo '<br />Result: ' . $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement