Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(preg_match('#\/hola (.*)#', $msj_texto)){
- EnviarMensaje($msj_chat_id,'Re2',false);
- #$url = str_replace('/hola ', '', $msj_texto);
- $url2 = str_replace(' ', '+', $msj_texto);
- function curl($url) {
- $ch = curl_init($url); // Inicia sesión cURL
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // Configura cURL para devolver el resultado como cadena
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Configura cURL para que no verifique el peer del certificado dado que nuestra URL utiliza el protocolo HTTPS
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
- $info = curl_exec($ch); // Establece una sesión cURL y asigna la información a la variable $info
- curl_close($ch); // Cierra sesión cURL
- return $info; // Devuelve la información de la función
- }
- $hola = curl('http://riasgremory.000webhostapp.com/botname.php?texto='.$url2);
- #$hola = file_get_contents('http://riasgremory.000webhostapp.com/botname.php?texto='.$url2);
- $fap = preg_match('#<title>([^\"]*)</title>', $hola);
- preg_match_all('#<h1>([^\"]*)</h1>#', $hola, $pop);
- preg_match_all('#<h2>([^\"]*)</h2>#', $hola, $pep);
- preg_match_all('#<h3>([^\"]*)</h3>#', $hola, $pap);
- EnviarMensaje($msj_chat_id,'Animes',false);
- #preg_match_all('#<cite class="iUh30">([^\"]*)</cite>#', $hola, $pap);
- for ($i = 1; $i <= 100; $i++) {
- try{
- if(!isset($pop[1][$i])){
- }else{
- $replace = str_replace('?q=', '',$pop[1][$i]);
- #echo ''.$replace.'<br>'.$pop[2][$i].'<br><br>';
- #echo '<a href="'.$replace.'">'.$pop[2][$i].'</a><br><br>';
- #echo '<h1>'.$pop[2][$i].'</h1><br>';
- EnviarMensaje($msj_chat_id,'Nombre:'.$pop[1][$i].'\n',false);
- EnviarMensaje($msj_chat_id,'Pag:'.$fap[1][1].'\n',false);}
- if(!isset($pep[1][$i])){
- }else{
- EnviarMensaje($msj_chat_id,'Url:'.$pep[1][$i].'\n',false);}
- if(!isset($pap[1][$i])){
- }else{
- EnviarMensaje($msj_chat_id,'Descripcion:'.$pap[1][$i].'\n',false);}
- } catch (Exception $e) {
- echo '', $e->getMessage(), "<br><br>\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement