HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.vcbgq.com/lianjie/2.php


<?php
$servername = "localhost";
$username = "127_0_0_8";
$password = "127_0_0_8";
$dbname = "127_0_0_8";
 
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("连接失败: " . $conn->connect_error);
} 
 
$sql = "SELECT title,admin_id FROM houtai_archives where typeid='186'";
$result = $conn->query($sql);
 
if ($result->num_rows > 0) {
    // 输出数据
    while($row = $result->fetch_assoc()) {
        echo "title: " . $row["title"]. "<br>";
        echo "admin_id: " . $row["admin_id"]. "<br>";
   //发邮件开始
  $site = $row["title"];//不行的链接
// $site = "https://www.baidu.com/";  
//   $site = "https://sites.google.com/view/30daysup/home";//可以的链接

$content = get_sitemeta($site);
print_r($content);
/** 获取META信息 */
function get_sitemeta($url) {
$data = file_get_contents($url);
$meta = array();
if (!empty($data)) {
#Title
preg_match('/<title>([\w\W]*?)<\/title>/si', $data, $matches);
if (!empty($matches[1])) {
$meta['title'] = $matches[1];
}
 
}
  if(strpos($meta['title'],'Google')!==false){
         $site = $row["title"];//不行的链接
   echo "<div style='height:1920px;width:100%'></div>";
 include_once("mail.inc.php");
$smtp = new smtp("smtp.163.com",25,true,"17620811798@163.com","aa12345678","17620811798@163.com");//发件人信箱信息
$smtp->debug = false;//是否显示发送的调试信息 FALSE or TRUE
 $mailto="1006941410@qq.com";//收件人信箱
$mailsubject="网站链接失效通知";
$mailfrom="网站链接失效通知";
$mailbody="失效的链接是:&nbsp;".$site."<br>"; 
 
//其他的表单项目以此类推
$mailtype 		= 	"HTML";//邮件格式(HTML/TXT),TXT为文本邮件
$mailsubject 	= 	'=?UTF-8?B?'.base64_encode($mailsubject).'?=';//邮件主题
$mailfrom  	= 	'=?UTF-8?B?'.base64_encode($mailfrom).'?=';//发件人
$smtp->sendmail($mailto, $mailfrom, $mailsubject, $mailbody, $mailtype);
echo "<script language=\"JavaScript\">alert(\"恭喜你提交成功!我们会尽快回复您!\");history.go(-1)</script>"; exit();
    }
  
}  
//发邮件结束     
        
        
        
        
        
        
        $sql2 = "SELECT pen_name  FROM houtai_admin where admin_id=". $row["admin_id"]. "";
$result2 = $conn->query($sql2);
        if ($result2->num_rows > 0) {
    // 输出数据
    while($row2 = $result2->fetch_assoc()) {
        echo "pen_name: " . $row2["pen_name"]. "<br>";
    }}
       else {
    echo " ";
} 
        
        
    }
} else {
    echo " ";
}








//   $tmparray = explode($biaoti,'百度'); 
//  if(count($tmparray)>1){ 
//   return true; 
//  } else{ 
//   return false; 
//  } 
  
 
 


 

?>