cURL/PHP - Outputting Different Data

Discussion in 'PHP' started by clookid, Sep 24, 2007.

  1. #1
    I would like multiple, different urls / proxy servers / proxy ports to be submitted, all on the same script (without having to create any other files).

    function file_get_contents_proxy($szURL, $szProxy, $iProxyPort)
    {
        $pCurl = curl_init($szURL);
        
        curl_setopt(CURLOPT_PROXY, $szProxy);
        curl_setopt(CURLOPT_PROXYPORT, $iProxyPort);
        
        curl_setopt(CURLOPT_FOLLOWLOCATION, true);
        curl_setopt(CURLOPT_RETURNTRANSFER, true);
        
        return curl_exec($pCurl);
    }
    
    $szURL = 'https://clooscript01:$password@api.del.icio.us/v1/posts/add?url=$url&description=$description&extended=$note&tags=$tags&shared=yes';
    $szProxy = '221.233.134.87';
    $iProxyPort = '8080';
    
    file_get_contents_proxy($szURL, $szProxy, $iProxyPort);
    file_get_contents_proxy(Output different URL, Output different Proxy, Output different Port);
    PHP:
    How can I get that to work?
     
    clookid, Sep 24, 2007 IP
    Alvin likes this.