I am running 2.0.7. THIS is what I did.
I took the same function that exists within 2.1 (ITS FIXED) and replaced the old fucntion. It works fine.
YOU DO NOT NEED TO RUN 2.1 TO FIX THAT HOLE.
This is the fucnction taken right out of 2.1, and it works perfectly within 2.0.7:
function wp_remote_fopen( $uri ) {
$timeout = 10;
$parsed_url = @parse_url($uri);
if ( !$parsed_url || !is_array($parsed_url) )
return false;
if ( !isset($parsed_url['scheme']) || !in_array($parsed_url['scheme'], array('http','https')) )
$uri = 'http://' . $uri;
if ( ini_get('allow_url_fopen') ) {
$fp = @fopen( $uri, 'r' );
if ( !$fp )
return false;
stream_set_timeout($fp, $timeout); // Requires php 4.3
$linea = '';
while( $remote_read = fread($fp, 4096) )
$linea .= $remote_read;
fclose($fp);
return $linea;
} else if ( function_exists('curl_init') ) {
$handle = curl_init();
curl_setopt ($handle, CURLOPT_URL, $uri);
curl_setopt ($handle, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt ($handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($handle, CURLOPT_TIMEOUT, $timeout);
$buffer = curl_exec($handle);
curl_close($handle);
return $buffer;
} else {
return false;
}
}
Its just fixed, it doesnt use any special additons from 2.1 and it would be nice if ppl gave decent advice instead of "working" to get ppl to upgrade to something they dont need to.
Im not neccessarily talking about you diane, btw, about the "working" thing, I just think ppl dont realize that they dont have to run that blasted bug ridden 2.1