SHARE
TWEET

Untitled

a guest Jun 20th, 2012 451 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ?>
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top