Muchas gracias por su respuesta Triby, testie su código pero sigue sin funcionar, de echo no me esta arrojando ningún resultado.
Esto es lo que estoy haciendo.
Código PHP:
Ver original<?php
//--------------------------------------
$url = "http://www.taringa.net/posts/reviews/12759660/Como-ver-Cuevana-en-HD-_Facil_.html#pagina-3";
$options[CURLOPT_URL] = $url;
$options[CURLOPT_USERAGENT] = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1";
$options[CURLOPT_FOLLOWLOCATION] = true;
$options[CURLOPT_RETURNTRANSFER] = true;
$data = sm_curl($options);
echo $data['response'];
//--------------------------------------
function sm_curl($options){
// Hay que seguir redireccionamientos?
$follow = (isset($options[CURLOPT_FOLLOWLOCATION
])) ?
$options[CURLOPT_FOLLOWLOCATION
] : false;
// Instanciamos cURL
if(ini_get('open_basedir') != '' || ini_get('safe_mode' == 'On') && $follow) { // Aqui entramos solo si hay que seguir redireccionamientos y
// open_basedir o safe_mode estan activos
// Eliminamos la opcion CURL para seguir redireccionamientos
unset($options[CURLOPT_FOLLOWLOCATION
]);
// Establecemos las opciones
// Ejecutamos y seguimos redireccionamientos
$response = curl_redir_exec($go);
} else {
// Ejecutar
// Obtener errores
}
return $response;
}
// Seguir redireccionamientos con open_basedir o safe_mode = On
function curl_redir_exec($ch) {
static $curl_loops = 0;
static $curl_max_loops = 20;
if ($curl_loops++>= $curl_max_loops) {
$curl_loops = 0;
return array('response' => '', 'headers' => '', 'errorNumber' => '47', 'errorMessage' => 'Too many redirects'); }
$http_code = $headers['http_code'];
if ($http_code == 301 || $http_code == 302) {
preg_match('/Location:(.*?)\n/', $header, $matches); if (!$url) {
//couldn't process the url to redirect to
$curl_loops = 0;
return array('response' => '', 'headers' => '', 'errorNumber' => 3, 'errorMessage' => 'The URL was not properly formatted (redirect).'); }
if (!$url['scheme'])
$url['scheme'] = $last_url['scheme'];
if (!$url['host'])
$url['host'] = $last_url['host'];
if (!$url['path'])
$url['path'] = $last_url['path'];
$new_url = $url['scheme'] . '://' . $url['host'] . $url['path'] . ($url['query']?'?'.$url['query']:'');
return curl_redir_exec($ch);
} else {
$curl_loops=0;
'response' => $data,
'headers' => $headers,
);
}
}
?>
Espero pueda ayudarme, desde ya muchas gracias.
Saludos.