<?php Class clear_virus{ //public $content; public $infectFile ='virus.txt'; public $savefile ="save.txt"; public $timep ='time.txt'; public $checkFile ='e.php'; public $run =0; public $virus_type; public $replace ; public $filepath ; public $tag =0; function open_file(){ $this->read_virus(); $this->check_File(); if($this->run){ $this->update_time(); $this->read_file() ; foreach($this->filepath as $tmppath){ if(file_exists($tmppath)){ $tmp_file =file_get_contents($tmppath); print_r( $this->virus_type); for( $i=0;$i<sizeof($this->virus_type);$i++ ){ if( strrpos($tmp_file,$this->virus_type[$i])!== false){ $tmp_file =str_replace($this->virus_type[$i],'',$tmp_file); $this->tag =1; } } if( $this->tag ){ $handle =fopen($tmppath,'w'); fwrite($handle,$tmp_file); fclose($handle); unset($tmp_file); } }else{ ; } } } }
This is a PHP security class for web virus removal. You can view the virus file list file, view the virus file list, and record the virus removal time.
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
13 Jul 2016
PHP web virus removal category, PHP web virus removal. PHP web page virus removal class, PHP web page virus removal class. This article describes the PHP web page virus removal class with examples. Share it with everyone for your reference. The details are as follows: I believe that many people’s web pages are often deleted.
18 Aug 2017
Do web pages often add some Trojan addresses in the background of php, asp, html, js and other files for no reason? First, we need to read the $checkFile file. This article is to determine whether an article is infected. If so, it will execute $ All files in the txt file path in the savafile variable will be cleared once according to your infecFile virus list.
29 Jul 2016
1kb folder shortcut virus removal special attachment: 1kb folder shortcut virus removal special attachment Function code for batch modifying file suffix names in PHP: Copy the code as follows: <?php function foreachDir($path){ $handle=opendir( $path); if($handle){ while (false !== ($file = readdir($handle))) { if($file!="." && $file!='..'){ if( is_dir($path.$file)){ echo $
13 Jul 2016
A perfect GIF proportional scaling class for PHP, with the ability to remove the black background from scaling. Nowadays, everyone likes to encapsulate things into classes... Just call them. I won't say how to call them. Copy the code. The code is as follows: ?php class resize_image{ private $o_img_width;//original image
13 Dec 2024
Linking Static Libraries to Other Static Libraries: A Comprehensive ApproachStatic libraries provide a convenient mechanism to package reusable...
03 Jun 2023
Third-party class libraries Third-party class libraries refer to other class libraries besides the ThinkPHP framework and application project class libraries. They are generally provided by third-party systems or products, such as class libraries of Smarty, Zend and other systems. For the class libraries imported earlier using automatic loading or the import method, the ThinkPHP convention is to use .class.php as the suffix. Non-such suffixes need to be controlled through the import parameters. But for the third type of library, since there is no such agreement, its suffix can only be considered to be php. In order to easily introduce class libraries from other frameworks and systems, ThinkPHP specifically provides the function of importing third-party class libraries. Third-party class libraries are uniformly placed in the ThinkPHP system directory/
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images