Advertisement
EnggarHakim

twit ID

Jul 29th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <form action="" method="post">
  2. <input class="textinput" type="text" name="id" size="35" />
  3. <input class="buttonsubmit" type="submit" name="submit" value="Get Twitter ID" /></form>
  4. <?php
  5. if(isset($_POST['id'])){
  6. $ch = curl_init();
  7. $post = "input=" . $_POST['id'];
  8. $url = "http://tweeterid.com/ajax.php";
  9. curl_setopt($ch,CURLOPT_URL,$url);
  10. curl_setopt($ch,CURLOPT_POST,count($fields));
  11. curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
  12. curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
  13. curl_setopt($ch,CURLOPT_CONNECTTIMEOUT ,3);
  14. curl_setopt($ch,CURLOPT_TIMEOUT, 20);
  15. $response = curl_exec($ch);
  16. print "Twitter ID : " . $response;
  17. curl_close ($ch);
  18. }
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement