Blog for hpHosts, and whatever else I feel like writing about ....

Thursday, 11 September 2008

More vURL Online updates

I'm happy to announce, thanks to MalwareTeks and Montana Menagerie, vURL Online now has two more servers you can choose from!. Making it 2 x UK and 3 x US servers :o)

The PHP script I wrote previously, has also been updated, for those that would like to use it (and hopefully, offer a new vURL mirror ;o)). The new code is;

    $str =$_SERVER['QUERY_STRING'];
    // URL to get
    $urlStr = $getVarArray['url'];
    $urlStr = htmlspecialchars($urlStr, ENT_QUOTES);
    // Referer URL to use
    $refStr = $getVarArray['ref'];
    $refStr = htmlspecialchars($refStr, ENT_QUOTES);
    // User agent to pass
    $uaStr = $_SERVER['HTTP_USER_AGENT'];
    // Get the contents
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $urlStr);
    curl_setopt($curl, CURLOPT_VERBOSE, 1);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_HEADER, 1);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($curl, CURLOPT_REFERER, $refURL);
    curl_setopt($curl, CURLOPT_USERAGENT, $uaStr);
    $return = curl_exec($curl);
    print $return;

No comments: