Zend - The PHP Company




Security

Add Code


Zend encoder detect files  

Type: code fragment
Added by: sysvic
Entered: 26/11/2005
Last modified: 02/12/2005
Rating: - (fewer than 3 votes)
Views: 2965
A very simple fuction to detect files encoded with Zend encoder.


<?php

function checkZencode($yourfile) {

    
$fp=fopen($yourfile,"ab+"); 
    
$beg=substr(fgets($fp,5),0,4); 
    
fclose($fp); 
    
    if (
$beg == "Zend") {
        
$beg "file encoded with Zend encoder";
    } else {    
        
$beg "file not encoded";
    }
        
    return 
$beg;
}

?>


Usage Example



checkZencode($yourfile);


Rate This Script





Search



This Category All Categories