Use this for using curl with proxy

PHP Code: 
curl_setopt($chCURLOPT_PROXYPORT8080);
curl_setopt($chCURLOPT_PROXYTYPE'HTTP');
curl_setopt($chCURLOPT_PROXY'127.0.0.1');
curl_setopt($chCURLOPT_PROXYUSERPWD'mypassifneeded');