PHP - ¿Me Pidieron ayuda a ejecutar este codigo pero no lo entiendo muy bien para que se usa?

 
Vista:

¿Me Pidieron ayuda a ejecutar este codigo pero no lo entiendo muy bien para que se usa?

Publicado por ThevenRex (1 intervención) el 26/08/2021 02:50:38
$navegador = get_agent();

function _curl($url, $post = false, $header = array(), $header_out = true, $follow_loc = true, $json = false) {
global $ckfile;
global $navegador;
$ch = curl_init();
if ($post) {
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
}
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, $header_out);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $follow_loc);
curl_setopt($ch, CURLOPT_USERAGENT, $navegador);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIESESSION, $ckfile);
curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
curl_setopt($ch, CURLOPT_COOKIE, $ckfile);
curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder