View Single Post
Old 04-24-2009, 10:39 PM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Code:
<?php




$file = "temp.txt";
$description = "temp file description";
$post_vars = array();
$post_vars['desc'] = "$description";
$post_vars['file'] = "@$file";


$url = 'http://dl084.zshare.net:3000/';

$return = http_post_form($url, $post_vars);
$ere = explode("zshare.net/download/",$return);
$sre = explode("/",$ere[1]);
$dlink = "http://www.zshare.net/download/$sre[0]";
echo $dlink;

function http_post_form($url, $vars) {
  $ch = curl_init();
  $timeout = 0; 
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);  
  curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); 
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
  $file_contents = curl_exec($ch);
  curl_close($ch);
  return $file_contents;
}
?>
__________________
hatisblack at yahoo.com

Last edited by SmokeyTheBear; 04-24-2009 at 10:43 PM..
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote