Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,131 @@
<?php
class curlManager{
public $curl;
public $login="";
public $mobile="iphone";
public $last_url="";
public $header_curl;
public function __construct($mobile="")
{
$this->mobile=$mobile;
}
public function changeCurl()
{
if($this->login=="")
$currentCooky=cookiesDirectory.uniqid().".txt";
else
$currentCooky=cookiesDirectory.$this->login.".txt";
if(file_exists($currentCooky))
unlink($currentCooky);
$this->close();
//$browser=random_user_agent_mobile($this->mobile);
$browser=random_user_agent();
$referrer=get_random_referrer();
$this->curl=new cURL($currentCooky,$browser,"",$referrer);
}
public function postData($url,$data)
{
//------Stop if it's time to stop the process----*/
$valide=false;
$noValide=0;
if(!is_object($this->curl))
$this->changeCurl();
while((!$valide)&&($noValide<10))
{
$this->curl->setUrl($url);
$this->curl->setPost($data);
$result=$this->curl->createCurl();
if($result["curl_error"]=="")
$valide=true;
else
die(" ==> HTTP CODE:".$result["http_code"]."<br>Can't open the url ".$url."<br>".$result["curl_error"]);
$noValide++;
/*if($result["http_code"]==0)
$this->add_debug_exit($this->processName." ==> HTTP CODE:".$result["http_code"]."<br>Can't open the url ".$url."<br>".$result["curl_error"],1);*/
}
if($noValide>=10)
die(" ==> HTTP CODE:".$result["http_code"]."<br>Can't open the url ".$url."<br>".$result["curl_error"]);
$this->last_url=$result['last_url'];
$this->header_curl=$result['header'];
return $result["body"];
}
public function getContent($url)
{
//------Stop if it's time to stop the process----*/
$valide=false;
$noValide=0;
if(!is_object($this->curl))
$this->changeCurl();
while((!$valide)&&($noValide<10))
{
$this->curl->setUrl($url);
$result=$this->curl->createCurl();
if($result["http_code"]==503)
{
$valide=true;
break;
}
if($result["curl_error"]=="")
$valide=true;
else
{
return "error";
}
$noValide++;
/*if($result["http_code"]==0)
$this->add_debug_exit($this->processName." ==> HTTP CODE:".$result["http_code"]."<br>Can't open the url ".$url."<br>".$result["curl_error"],1);*/
}
if($noValide>=10)
return "error";
$this->last_url=$result['last_url'];
$this->header_curl=$result['header'];
return $result["body"];
}
function close()
{
if(is_object($this->curl))
{
$this->curl->close();
if($this->curl->path_to_cookies!="")
{
if(file_exists($this->curl->path_to_cookies))
{
unlink($this->curl->path_to_cookies);
}
}
unset($this->curl);
}
}
}
?>