Home Backend Development PHP Tutorial PHP probe used when phpinfo() function is disabled

PHP probe used when phpinfo() function is disabled

Jul 25, 2016 am 08:54 AM

  1. header("content-type: text/html; charset=utf-8");

  2. header("cache-control: no-cache, must-revalidate");
  3. header("pragma: no-cache");
  4. error_reporting(0);
  5. ob_end_flush();

  6. ?>

  7. //加了这句,看看能不能解决linux下显示乱码的问题?
  8. php 探针 v1.0 - bbs.it-home.org
  9. [基本信息] [高级信息]
  10. if (function_exists("phpinfo")){
  11. echo'[phpinfo]';}

  12. echo'
    php探针v1.0 by mkduse(blueidea-id)

    此程序代码,可免费使用;但不得用于商业用途;完全转载或使用此代码,请保留版权信息;
    欢迎指正错误提建议,qq:122712355

';

  • if (empty($_get['typ'])){

  • baseinfo();}
  • else{
  • switch ($_get['typ']){
  • case 'phpinfo':
  • phpinfoview();
  • break;
  • case 'superinfo':
  • superinfo();
  • break;
  • case 'baseinfo':
  • baseinfo();
  • break;
  • default:
  • baseinfo();}
  • }

  • function getime()

  • {
  • $t = gettimeofday();
  • return (float)($t['sec'] + $t['usec']/1000000);
  • }

  • function baseinfo(){

  • echo '

    Basic information

    ';
  • $arr[]=array("current php version:",phpversion( ));
  • $arr[]=array("zend engine version:",zend_version());
  • $arr[]=array("server version",$_server['server_software']);
  • $arr[] =array("ip address",$_server['remote_host']);//ip
  • $arr[]=array("domain name",$_server['http_host']);
  • $arr[]=array(" Protocol port",$_server['server_protocol'].'  '.$_server['server_port']);
  • $arr[]=array("site root directory",$_server['path_translated']) ;
  • $arr[]=array("Server time",date('y year m month d day,h:i:s,d'));
  • $arr[]=array("current user",get_current_user( ));
  • $arr[]=array("operating system",php_uname('s').php_uname('r').php_uname('v'));
  • $arr[]=array("include_path", ini_get('include_path'));
  • $arr[]=array("server api",php_sapi_name());

  • $arr[]=array("error_reporting level",ini_get( "display_errors"));

  • $arr[]=array("post submission limit",ini_get('post_max_size'));
  • $arr[]=array("upload_max_filesize",ini_get('upload_max_filesize'));
  • $ arr[]=array("Script timeout",ini_get('max_execution_time').'seconds');

  • if (ini_get("safe_mode")==0){

  • $arr []=array("php safe mode (safe_mode)",'off');}
  • else{
  • $arr[]=array("php safe mode (safe_mode)",'on');}
  • if (function_exists('memory_get_usage')){

  • $arr[]=array("memory_get_usage",ini_get('memory_get_usage'));}

  • //$ arr[]=array("Available space",intval(diskfreespace('/')/(1024 * 1024))."m");

  • echo'';
  • for($i=0;$ i{
  • $overview='
  • ';
  • echo $overview;
  • }
  • echo'
  • '.$arr[$i][0].' '.$arr[$i][1].'
    ';
  • echo '< ;h2>Server performance test';
  • echo'';
  • echo'mkduse machine (p4 1.5g 256ddr winxp sp2)
  • ';
  • $ time_start=getime();
  • for($i=0;$i<=500000;$i++);
  • {$count=1+1;}
  • $timea=round((getime()-$time_start)*1000 ,2);
  • echo '
  • ';

  • $time_start=getime();

  • for($i=0;$i<=500000;$i++);
  • {sqrt(3.14);}
  • $timea=round((getime()-$ time_start)*1000,2);
  • echo '
  • ServerInteger operation
    500,000 additions (1+1)
    Floating point operations
    500,000 square roots (3.14 square roots)
    465.08ms466.66ms
    Current server'.$timea.'ms '.$timea.'ms
    ';

  • ? >
  • echo '

    Bandwidth Test

    ';
  • for ($i=0;$i<100;$i++){
  • print "";}

  • ?>

  • echo'

    Loaded extension library (enable)

    ';
  • $arr =get_loaded_extensions();
  • foreach($arr as $value){
  • echo $value.'
    ';}

  • echo'

  • Disabled functions

    ';

  • $disfun=ini_get('disable_functions' );
  • if (empty($disfun)){
  • echo 'not disabled

    ';}
  • else{
  • echo ini_get('disable_functions').'

    ';}
  • }//Close

  • function superinfo(){

  • echo'

    Advanced information

    php_ini_user 1 configuration options available in user php script or windows registry
    php_ini_perdir 2 Configuration options can be set in php.ini, .htaccess or httpd.conf
    php_ini_system 4 Configuration options can be set in php.ini or httpd.conf< ;br>php_ini_all 7 Configuration options can be set everywhere

    ';

  • $arr1=ini_get_all();

  • for ($i=0;$i
  • {
  • $arr2=array_slice($arr1,$i,1);
  • print_r($arr2);
  • echo '
    ';
  • }
  • }

  • function phpinfoview(){

  • phpinfo();
  • }
  • ?>
  • Copy code

    php server probe displays php server information PHP probe to obtain client information php probe code with view password Analysis of the reasons why the php probe does not display cpu, memory, and hard disk information



  • Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Best Graphic Settings
    2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. How to Fix Audio if You Can't Hear Anyone
    2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

    Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

    cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

    The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

    Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

    Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

    12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

    Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

    Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

    Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

    How to Register and Use Laravel Service Providers How to Register and Use Laravel Service Providers Mar 07, 2025 am 01:18 AM

    Laravel's service container and service providers are fundamental to its architecture. This article explores service containers, details service provider creation, registration, and demonstrates practical usage with examples. We'll begin with an ove

    PHP Logging: Best Practices for PHP Log Analysis PHP Logging: Best Practices for PHP Log Analysis Mar 10, 2025 pm 02:32 PM

    PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

    Customizing/Extending Frameworks: How to add custom functionality. Customizing/Extending Frameworks: How to add custom functionality. Mar 28, 2025 pm 05:12 PM

    The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

    See all articles