curl & proxies

nvanprooyen

Fortes Fortuna Adiuvat
Dec 8, 2008
3,189
82
0
Orlando, FL
Keep getting a "Warning: curl_setopt() expects parameter 1 to be resource, null given", but I'm passing it a IP and port. I even tried to hardcode a value in instead of using the variable to test it and it still throws the same error. Here is what my code looks like:

Code:
 curl_setopt($curl, CURLOPT_HTTPPROXYTUNNEL, 1);
 curl_setopt($curl, CURLOPT_PROXY, 'XXX.XXX.XXX.XXX:XXXX');
 curl_setopt($curl, CURLOPT_PROXYUSERPWD, 'username:password');

Any idea what I could be doing wrong? An option I'm missing?