code help

Discussion in 'PHP' started by djjenny, Nov 30, 2009.

  1. #1
    ?
    $code=$_GET['id'];
    $file = "http://www.sendspace.com/file/$code";
    $url = "$file";

    $params = "imageField=imageField&download=1&referer2="; //you must know what you want to post
    $user_agent = "Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)";
    $ch = curl_init();

    curl_setopt ($ch, CURLOPT_URL,$url);
    curl_setopt ($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
    curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    $page = trim(curl_exec($ch));


    Hi im try to get sendspace download link
     
    djjenny, Nov 30, 2009 IP
  2. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what's the variable $code?
     
    taminder, Dec 3, 2009 IP