Advertisement
Guest User

Untitled

a guest
Jun 20th, 2012
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2.  
  3. $link = 'your_old_link';
  4.  
  5.  
  6. function curl_request($url, $postdata) {
  7.    
  8.     // INITIALISE CURL REQUEST
  9.     $ch = curl_init($url);
  10.    
  11.     // CURL OPTIONS
  12.     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  13.     curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
  14.    
  15.     // EXECUTE CURL REQUEST
  16.     $result = curl_exec($ch);
  17.    
  18.     curl_close($ch);
  19.     return $result;
  20. }
  21.  
  22.  
  23. // POST DATA
  24. $postdata = array(
  25.     'link' => $link
  26. );
  27.  
  28.  
  29. echo curl_request('http://ncrypt.in/api_update_link.php', $postdata);
  30.  
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement