You need the format on the end of the twitter url, see the twitter api docs for more info:
http://apiwiki.twitter.com/Twitter-API-Documentation
The proxy is probably causing you issues as well, remove this line:
curl_setopt($ch, CURLOPT_PROXY,"localhost:80");