Ok chicos Les explico estoy conectándome con curl a mi pagina del banco, ingresa perfectamente, pero cuando me ejecuta la pagina como lo hace en mi servidor local, los hipervinculos los busca en mi servidor local algo así href="/HB/frontEnd/css/styleInterno.css", y como obviamente no están no me lo ejecuta y por tanto las funciones JS que necesito que funcionen para que me permita descargar el estado de cuenta o hacer una transferencia mediante un script .js no me funcionan, la idea que tengo en mente es editar dotas esas direcciones por las direcciones completas algo asi https://banfanbenlinea.banfanb.com.ve/HB//frontEnd/css/styleInterno.css" para que esto me pueda funcionar, quise meter la respuesta $ch en file($ch) para leerlo linea a linea y hacer un str_Replace pero no me funciono si alguien tiene una idea como hacer esto y me pudiese ayudar, aquí les pongo mi código
<?php //curl coneccion al banco
function loginBanfanb(){
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (ax)";
$cookies = getcwd() . "/cookies.txt";
$ch = curl_init("https://banfanbenlinea.banfanb.com.ve/HB/AppServN.EBK");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_REFERER,
"https://banfanbenlinea.banfanb.com.ve/HB/frontEnd/loginNatural.jsp");
curl_setopt ($ch, CURLOPT_POSTFIELDS,"inciar_tpo=&intento=1&vacio=vacio&tempUserid=******&userid=60385496465674&passw dnew=******&passwdHidden=%123456789");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookies);
//curl_setopt($ch, CURLOPT_HEADER, true);
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec($ch);
curl_close($ch);
}
loginBanfanb();
?>