07 Mar

Using PHP’s Curl functions behind a Proxy

Using PHP’s Curl functions even if the net is accessible only thru a proxy. This is the only way curl can be used if you use GoDaddy’s hosting.

<?php
ch = curl_init("http://rss.news.yahoo.com/rss/topstories");

curl_setopt(ch, CURLOPT_HEADER, false);
curl_setopt(ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt(ch, CURLOPT_PROXY, "http://192.168.0.15:80");
curl_setopt(ch, CURLOPT_PROXYPORT, 80);
//curl_setopt (ch, CURLOPT_PROXYUSERPWD, "username:password");

data = curl_exec (ch);
curl_close(ch);
printdata;
?>
05 Mar

CVS Through Proxy

Command to import a CVS project’s code through a proxy

Checkout code from remote  server(No Proxy)
cvs -z3 -d:ext:binnyva@nexty.cvs.sourceforge.net:/cvsroot/nexty co -d Nexty nexty

CVS through a Proxy
cvs -z3 "-d:pserver;proxy=192.168.0.15;proxyport=80:binnyva@nexty.cvs.sourceforge.net:/cvsroot/nexty" co -d Nexty nexty

I don’t know how to commit the changes. If someone knows, please leave a comment, mm-kay?
[tags]cvs,command,source control,proxy[/tags]