Ok guys I explain I am connecting with curl to my bank page, it enters perfectly, but when I run the page as it does on my local server, the hyperlinks look for them on my local server something like this href="/ HB / frontEnd / css / styleInterno.css ", and as they obviously are not running it, and therefore the JS functions that I need to work to allow me to download the account statement or make a transfer using a .js script do not work for me, the idea that I have in mind is to edit those addresses by the complete addresses something like this link "for this to work, I wanted to put the answer $ ch in file ($ ch) to read it line by line and do a str_Replace but it did not work if someone has an idea how to do this and could help me, here I put them my code
<?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();
?>