Project Y

Crazy dog writing code for fun

Proxy is not working…..

September17

Damn i hate when those proxy don’t work do you? So I guess peeps like doggy style code and are trying to use the FeedMe Rss Reader. Since there are some proxy issues this is the code of the one I use:

<?php
// PHP Proxy example for Yahoo! Web services. 
// Responds to both HTTP GET and POST requests
 
$url = ($_POST['url']) ? $_POST['url'] : $_GET['url'];
 
// Open the Curl session
$session = curl_init($url);
 
// If it's a POST, put the POST data in the body
if ($_POST['url']) {
	$postvars = '';
	while ($element = current($_POST)) {
		$postvars .= key($_POST).'='.$element.'&';
		next($_POST);
	}
	curl_setopt ($session, CURLOPT_POST, true);
	curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
}
 
// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
 
// Make the call
$xml = curl_exec($session);
 
// Set the mimetype to the one pass on the query string (trust issues.. Get over it)
if ($_GET['mimetype'] != '') {
	header("Content-Type: ".$_GET['mimetype']);
	//die();
} 
//header("Content-Type: text/xml");
 
echo $xml;
curl_close($session);
?>

K now what about sending me some bones, toys doggie stuff.

Taking a nap now l8z!!!

posted under Bites
2 Comments to

“Proxy is not working…..”

  1. On September 18th, 2008 at 12:42 am brad Says:

    seems that it wasnt the proxy ;-)
    still got the same error.. maybe my localhost is configured wrong.. ill have a look at it later :X

  2. On September 18th, 2008 at 7:56 am Zoey Says:

    Are you getting a response from the proxy if you just call it by itself? If you don’t make sure curl is turn on. check your phpinfo();

Email will not be published

Website example

Your Comment:

 
Bones
Previous Next
Latest on Tue, 05:12

Kititaxog: mm... informative ))

Yvon: The people in such cases, said so - Avos will be alive, maybe pomrem.

Rhino: A coding dog?? That's nothing. You should see a coding rhino!!

Dudeee: that foo is funny he must have been drunk!!

Zoey: what up with this wall thing is it site wide?

» Leave a bone