Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Curl Class by Philip Sturgeon
#1

[eluser]Unknown[/eluser]
Welcome
I have a problem with CodeIgniter Curl Class by Philip Sturgeon
Code:
function advance()
    {
        $this->curl->create('http://ip.wp.pl')
                    ->set_cookies(array('message'=>'Im advanced :-p'));
        $this->curl->proxy('217.98.20.195', '8080');
        $responce = $this->curl->execute();
        
        echo '<h1>Advanced</h1>';
        echo '<p>--------------------------------------------------------------------------</p>';
        
        if($responce) {
            
            echo $responce;
            
            echo '<br/><p>--------------------------------------------------------------------------</p>';
            echo '<h3>Debug</h3>';
            echo '<pre>';
            print_r($this->curl->info);
            echo '</pre>';
            
        } else {
            echo '<strong>cURL Error</strong>: '.$this->curl->error_string;
        }
    }
Error: The requested URL returned error: 403
http://helid.cal.pl/ruch/index.php/curl_test/advance
How do I fix this?
#2

[eluser]2think[/eluser]
I'm not very familiar with Phil's cURL class but the error returned means you don't have permission for that URI. How would you fix that? I think the only way to fix that is if you had control of the URI's host.
#3

[eluser]Unknown[/eluser]
Thanks for replay.
I Exchanged it for
Code:
$this->curl->create('http://google.pl');
Still the same error
#4

[eluser]2think[/eluser]
Apologies for missing this, busy weekend here in the US.

I briefly looked at Phil's cURL lib to see how he has used it. I see in your code, you use "function advance()" so I'm guessing that you have tried the simple examples he listed?

If no, then perhaps that is in order. If yes (you have tried the simple examples and it succeeded), then maybe using the simple with the appropriate params would be best for now?




Theme © iAndrew 2016 - Forum software by © MyBB