function get($url, $ip = null, $timeout = 5)
    {
        // set url to post to
        curl_setopt($this->ch, CURLOPT_URL, $url);
        //set method to get
        curl_setopt($this->ch, CURLOPT_HTTPGET, true);
        // return into a variable rather than displaying it
        curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);

        if (empty($this->reqHeader['User-Agent']))
        {
            curl_setopt($this->ch, CURLOPT_USERAGENT, $this->userAgent);
        }
        $this->url = $url;
        //bind to specific ip address if it is sent trough arguments
        if ($ip)
        {
            if ($this->debug)
            {
                echo "Binding to ip $ip\n";
            }
            curl_setopt($this->ch, CURLOPT_INTERFACE, $ip);
        }

        //set curl function timeout to $timeout
        curl_setopt($this->ch, CURLOPT_TIMEOUT, $timeout);
        return $this->execute();
    }
function get($url, $ip = null, $timeout = 5)
    {
        // set url to post to
        curl_setopt($this->ch, CURLOPT_URL, $url);
        //set method to get
        curl_setopt($this->ch, CURLOPT_HTTPGET, true);
        // return into a variable rather than displaying it
        curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);

        if (empty($this->reqHeader['User-Agent']))
        {
            curl_setopt($this->ch, CURLOPT_USERAGENT, $this->userAgent);
        }
        $this->url = $url;
        //bind to specific ip address if it is sent trough arguments
        if ($ip)
        {
            if ($this->debug)
            {
                echo "Binding to ip $ip\n";
            }
            curl_setopt($this->ch, CURLOPT_INTERFACE, $ip);
        }

        //set curl function timeout to $timeout
        curl_setopt($this->ch, CURLOPT_TIMEOUT, $timeout);
        return $this->execute();
    }
function get ( $ url , $ ip = null , $ timeout = 5 ) { // set url to post to curl_setopt ( $ this -> ch , CURLOPT_URL , $ url ) ; //set method to get curl_setopt ( $ this -> ch , CURLOPT_HTTPGET , true ) ; // return into a variable rather than displaying it curl_setopt ( $ this -> ch , CURLOPT_RETURNTRANSFER , true ) ; if ( empty ( $ this -> reqHeader [ 'User-Agent' ] ) ) { curl_setopt ( $ this -> ch , CURLOPT_USERAGENT , $ this -> userAgent ) ; } $ this -> url = $ url ; //bind to specific ip address if it is sent trough arguments if ( $ ip ) { if ( $ this -> debug ) { echo "Binding to ip $ip\n" ; } curl_setopt ( $ this -> ch , CURLOPT_INTERFACE , $ ip ) ; } //set curl function timeout to $timeout curl_setopt ( $ this -> ch , CURLOPT_TIMEOUT , $ timeout ) ; return $ this -> execute ( ) ; }
fetch data from target URL
return data returned from url or false if error occured
@param string $url
@param string $ip address to bind (default null)
@param int $timeout in sec for complete curl operation (default 5)
@return string data
@access public
fetch data from target URL return data returned from url or false if error occured