Version Description
Download this release
Release Info
Developer | christopherross |
Plugin | WordPress phpinfo() |
Version | 3.5 |
Comparing to | |
See all releases |
Code changes from version 0.1.3 to 3.5
- icon.png +0 -0
- index.html +0 -41
- readme.txt +67 -16
- screenshot-1.jpg +0 -0
- timu-phpinfo.php +2 -61
- wordpress-php-info.php +181 -0
icon.png
ADDED
Binary file
|
index.html
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
-
<head>
|
4 |
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5 |
-
<title>WordPress PHPInfo() Plugin</title>
|
6 |
-
</head>
|
7 |
-
|
8 |
-
<body>
|
9 |
-
<h1> WordPress PHPInfo() Plugin</h1>
|
10 |
-
<h2>Plugin Name </h2>
|
11 |
-
<p>Contributors: <a href="http://wordpress.org/extend/plugins/profile/christopherross">christopherross</a><br />
|
12 |
-
Plugin URI: <a href="http://www.thisismyurl.com/wordpress/plugins/wordpress-phpinfo/">http://www.thisismyurl.com/wordpress/plugins/wordpress-phpinfo/</a><br />
|
13 |
-
Donate link:<a href="http://www.thisismyurl.com/donate/"> http://www.thisismyurl.com/donate/</a><br />
|
14 |
-
Tags: simple, php, admin, phpinfo<br />
|
15 |
-
Requires at least: 2.0.0<br />
|
16 |
-
Tested up to: 2.7.1<br />
|
17 |
-
Stable tag: 0.1.3</p>
|
18 |
-
<p>It's important for a non technical administrator to be able to diagnose server related problems in WordPress but also rapidly retrieve feedback regarding their web server. This simple plugin adds an option to an adminstrator's Tools menu which displays standard phpinfo() feedback details to the user. </p>
|
19 |
-
<h2> Description </h2>
|
20 |
-
<p>It's important for a non technical administrator to be able to diagnose server related problems in WordPress but also rapidly retrieve feedback regarding their web server. This simple plugin adds an option to an adminstrator's Tools menu which displays standard phpinfo() feedback details to the user. </p>
|
21 |
-
<p>This a very simple script, designed to help the non technical user get immediate feedback about their blog.</p>
|
22 |
-
<h2> Installation </h2>
|
23 |
-
<p>To install the plugin, please upload the folder to your plugins folder and active the plugin.</p>
|
24 |
-
<h2> Updates </h2>
|
25 |
-
<p>Updates to the plugin will be posted here, to <a href="http://www.thisismyurl.com/wordpress/plugins/wordpress-phpinfo/">http://www.thisismyurl.com/wordpress/plugins/wordpress-phpinfo/</a>)</p>
|
26 |
-
<h2> Frequently Asked Questions </h2>
|
27 |
-
<h3> Where is the information displayed? </h3>
|
28 |
-
<p>Under your Plugins page, there is a link for settings beside the plugin details as well as in your Tools menu.</p>
|
29 |
-
<h3> Is this plugin stable? </h3>
|
30 |
-
<p>Technically yes. Until I upgrade the version to 1.x, I still consider it to be in development but yes it has been tested and works well.</p>
|
31 |
-
<h2> Donations </h2>
|
32 |
-
<p>If you would like to donate to help support future development of this tool, please visit <a href="http://www.thisismyurl.com/donate/">http://www.thisismyurl.com/donate/</a><br />
|
33 |
-
</p>
|
34 |
-
<h2> Change Log </h2>
|
35 |
-
<p>0.1.2 (2009-03-16)<br />
|
36 |
-
Added the change log</p>
|
37 |
-
<p>0.1.3 (2009-03-26)<br />
|
38 |
-
- Happy Birthday to me<br />
|
39 |
-
- Fixed a link in the readme.txt file</p>
|
40 |
-
</body>
|
41 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,23 +1,28 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: christopherross
|
3 |
-
Plugin URI: http://
|
4 |
-
Donate link:
|
5 |
-
Tags: simple, php, admin, phpinfo
|
6 |
-
Requires at least:
|
7 |
-
Tested up to: 2.
|
8 |
-
Stable tag:
|
9 |
|
10 |
-
It's important for a non technical administrator to be able to diagnose server related problems in WordPress
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
It's important for a non technical administrator to be able to diagnose server related problems in WordPress but also rapidly retrieve feedback regarding their web server. This simple plugin adds an option to an
|
15 |
|
16 |
This a very simple script, designed to help the non technical user get immediate feedback about their blog.
|
17 |
|
18 |
== Updates ==
|
19 |
-
|
20 |
-
)
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
== Installation ==
|
23 |
|
@@ -29,19 +34,65 @@ To install the plugin, please upload the folder to your plugins folder and activ
|
|
29 |
|
30 |
Under your Plugins page, there is a link for settings beside the plugin details as well as in your Tools menu.
|
31 |
|
32 |
-
=
|
|
|
|
|
33 |
|
34 |
-
Technically yes. Until I upgrade the version to 1.x, I still consider it to be in development but yes it has been tested and works well.
|
35 |
|
36 |
== Donations ==
|
37 |
-
|
|
|
38 |
|
39 |
|
40 |
== Change Log ==
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
0.1.2 (2009-03-16)
|
43 |
Added the change log
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: christopherross
|
3 |
+
Plugin URI: http://thisismyurl.com/downloads/wordpress/plugins/wordpress-phpinfo/
|
4 |
+
Donate link: http://thisismyurl.com/
|
5 |
+
Tags: simple, php, admin, phpinfo,debugging, configuration, server, support, troubleshooting
|
6 |
+
Requires at least: 3.0.0
|
7 |
+
Tested up to: 3.2.1
|
8 |
+
Stable tag: 3.5
|
9 |
|
10 |
+
It's important for a non technical administrator to be able to diagnose server related problems in WordPress.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
It's important for a non technical administrator to be able to diagnose server related problems in WordPress but also rapidly retrieve feedback regarding their web server. This simple plugin adds an option to an administrator's Tools menu which displays standard phpinfo() feedback details to the user.
|
15 |
|
16 |
This a very simple script, designed to help the non technical user get immediate feedback about their blog.
|
17 |
|
18 |
== Updates ==
|
19 |
+
|
20 |
+
Updates to the plugin will be posted here, to [Christopher Ross](http://thisismyurl.com/downloads/wordpress/plugins/wordpress-phpinfo/)
|
21 |
+
|
22 |
+
== Screenshots ==
|
23 |
+
|
24 |
+
1. PHP Info for WordPress
|
25 |
+
|
26 |
|
27 |
== Installation ==
|
28 |
|
34 |
|
35 |
Under your Plugins page, there is a link for settings beside the plugin details as well as in your Tools menu.
|
36 |
|
37 |
+
= Can I call it in a theme? =
|
38 |
+
|
39 |
+
To call the function from a theme include the code wordpressphpinfo(); in your theme code.
|
40 |
|
|
|
41 |
|
42 |
== Donations ==
|
43 |
+
|
44 |
+
If you would like to donate to help support future development of this tool, please visit [Christopher Ross](http://thisismyurl.com/downloads/wordpress/plugins/wordpress-phpinfo/)
|
45 |
|
46 |
|
47 |
== Change Log ==
|
48 |
|
49 |
+
3.5
|
50 |
+
* updated WP admin screens
|
51 |
+
* tested to WordPress 3.2
|
52 |
+
|
53 |
+
3.1
|
54 |
+
* updated WP admin screens
|
55 |
+
* tested to WordPress 3.1
|
56 |
+
|
57 |
+
3.0.01
|
58 |
+
* converted plugin to utilize CR common library
|
59 |
+
* altered phpinfo() output to avoid theme conflicts
|
60 |
+
|
61 |
+
2.0.1
|
62 |
+
* documentation updates
|
63 |
+
|
64 |
+
2.0.0
|
65 |
+
* efficiency updates, repaired broken link
|
66 |
+
|
67 |
+
1.1.2
|
68 |
+
* updated update functions
|
69 |
+
|
70 |
+
1.1.0
|
71 |
+
* 2.8 compatibility fixes
|
72 |
+
|
73 |
+
1.0.3
|
74 |
+
* 2.8 compatibility fixes
|
75 |
+
|
76 |
+
1.0.0
|
77 |
+
* upgraded admin menus
|
78 |
+
* moved pages to settings panel
|
79 |
+
|
80 |
+
0.2.1 (2009-05-07)
|
81 |
+
* documentation modification
|
82 |
+
|
83 |
+
0.2.0 (2009-05-07)
|
84 |
+
* removed a header call which was causing some problems on isolated servers.
|
85 |
+
|
86 |
+
0.1.3 (2009-03-26)
|
87 |
+
* Happy Birthday to me
|
88 |
+
* Fixed a link in the readme.txt file
|
89 |
+
|
90 |
0.1.2 (2009-03-16)
|
91 |
Added the change log
|
92 |
|
93 |
+
|
94 |
+
== Upgrade Notice ==
|
95 |
+
|
96 |
+
3.0.01
|
97 |
+
* converted plugin to utilize CR common library
|
98 |
+
* altered phpinfo() output to avoid theme conflicts
|
screenshot-1.jpg
ADDED
Binary file
|
timu-phpinfo.php
CHANGED
@@ -1,67 +1,8 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
|
4 |
-
Plugin URI: http://www.thisismyurl.com/wordpress/plugins/wordpress-phpinfo/
|
5 |
-
Description: This simple plugin adds an option to an adminstrator's Tools menu which displays standard phpinfo() feedback details to the user.
|
6 |
-
Author: Christopher Ross
|
7 |
-
Version: 0.1.2
|
8 |
-
Author URI: http://www.thisismyurl.com
|
9 |
*/
|
10 |
|
11 |
-
|
12 |
-
/* Copyright 2008 Christopher Ross (email : info@thisismyurl.com)
|
13 |
-
|
14 |
-
This program is free software; you can redistribute it and/or modify
|
15 |
-
it under the terms of the GNU General Public License as published by
|
16 |
-
the Free Software Foundation; either version 2 of the License, or
|
17 |
-
(at your option) any later version.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
27 |
-
*/
|
28 |
-
|
29 |
-
|
30 |
-
add_action('admin_menu', 'wordpressphpinfo_add_pages');
|
31 |
-
add_action('wp_head','addHeaderCode');
|
32 |
-
add_filter('plugin_action_links', 'wordpressphpinfo_action', -10, 2);
|
33 |
-
|
34 |
-
|
35 |
-
add_filter('plugin_action_links', 'wordpressphpinfo_action', -10, 2);
|
36 |
-
function wordpressphpinfo_action($links, $file) {
|
37 |
-
// adds the link to the settings page in the plugin list page
|
38 |
-
if ($file == plugin_basename(dirname(__FILE__).'/timu-phpinfo.php'))
|
39 |
-
$links[] = "<a href='edit.php?page=wordpressphpinfo'>" . __('Results', 'WordPress PHP Info') . "</a>";
|
40 |
-
return $links;
|
41 |
-
}
|
42 |
-
|
43 |
-
|
44 |
-
function wordpressphpinfo_add_pages() {
|
45 |
-
add_management_page('WordPress PHP Info', 'WordPress PHP Info', 8, 'wordpressphpinfo', 'wordpressphpinfo');
|
46 |
-
}
|
47 |
-
|
48 |
-
function wordpressphpinfo() {
|
49 |
-
echo '<div class="wrap">';
|
50 |
-
echo '<h2>phpinfo() Results</h2>';
|
51 |
-
|
52 |
-
|
53 |
-
if (function_exists("phpinfo")) {
|
54 |
-
echo phpinfo();
|
55 |
-
} else {
|
56 |
-
echo "Sorry, your server does not appear to have phpinfo() installed.";
|
57 |
-
}
|
58 |
-
|
59 |
-
|
60 |
-
echo "
|
61 |
-
<p><strong>Want to say thank you?</strong></p>
|
62 |
-
<p>Using this plug-in is free, but if you'd like to say thanks you can <a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2098421'>send me a small donation</a>.<br/>Even better, a simple link from your web site to mine (<em><a href='http://www.thisismyurl.com'>http://www.thisismyurl.com</a></em>).</p>";
|
63 |
-
|
64 |
-
echo '</small></div>';
|
65 |
-
}
|
66 |
|
67 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
+
legacy file, no longer used.
|
|
|
|
|
|
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
+
include_once('wordpress-php-info.php')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
?>
|
wordpress-php-info.php
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WordPress phpinfo()
|
4 |
+
Plugin URI: http://thisismyurl.com/downloads/wordpress/plugins/wordpress-phpinfo/
|
5 |
+
Description: This simple plugin adds an option to an adminstrator's Tools menu which displays standard phpinfo() feedback details to the user.
|
6 |
+
Author: Christopher Ross
|
7 |
+
Version: 3.5.0
|
8 |
+
Author URI: http://thisismyurl.com
|
9 |
+
*/
|
10 |
+
|
11 |
+
|
12 |
+
/*
|
13 |
+
/--------------------------------------------------------------------\
|
14 |
+
| |
|
15 |
+
| License: GPL |
|
16 |
+
| |
|
17 |
+
| Copyright (C) 2011, Christopher Ross |
|
18 |
+
| http://thisismyurl.com |
|
19 |
+
| All rights reserved. |
|
20 |
+
| |
|
21 |
+
| This program is free software; you can redistribute it and/or |
|
22 |
+
| modify it under the terms of the GNU General Public License |
|
23 |
+
| as published by the Free Software Foundation; either version 2 |
|
24 |
+
| of the License, or (at your option) any later version. |
|
25 |
+
| |
|
26 |
+
| This program is distributed in the hope that it will be useful, |
|
27 |
+
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
28 |
+
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
29 |
+
| GNU General Public License for more details. |
|
30 |
+
| |
|
31 |
+
| You should have received a copy of the GNU General Public License |
|
32 |
+
| along with this program; if not, write to the |
|
33 |
+
| Free Software Foundation, Inc. |
|
34 |
+
| 51 Franklin Street, Fifth Floor |
|
35 |
+
| Boston, MA 02110-1301, USA |
|
36 |
+
| |
|
37 |
+
\--------------------------------------------------------------------/
|
38 |
+
*/
|
39 |
+
|
40 |
+
|
41 |
+
// add menu to WP admin
|
42 |
+
function thisismyurl_php_info_wordpress_menu() {
|
43 |
+
$thisismyurl_php_info_settings = add_management_page( 'phpinfo()', 'phpinfo()', 'edit_posts', 'thisismyurl_php_info', 'thisismyurl_php_info_wordpress_options');
|
44 |
+
add_action('load-'.$thisismyurl_php_info_settings, 'thisismyurl_php_info_wordpress_scripts');
|
45 |
+
}
|
46 |
+
add_action('admin_menu', 'thisismyurl_php_info_wordpress_menu');
|
47 |
+
|
48 |
+
|
49 |
+
function thisismyurl_php_info_wordpress_scripts() {
|
50 |
+
wp_enqueue_style('dashboard');
|
51 |
+
wp_enqueue_script('postbox');
|
52 |
+
wp_enqueue_script('dashboard');
|
53 |
+
?>
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
<style>
|
58 |
+
.thisismyurl_php_info_key {width: 30%; float: left; padding-bottom: 10px; clear:left;}
|
59 |
+
.thisismyurl_php_info_value {width: 70%; float: left; padding-bottom: 10px; clear:right;}
|
60 |
+
</style>
|
61 |
+
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
<?php
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
function thisismyurl_php_info_wordpress_options() {
|
70 |
+
|
71 |
+
if ($_POST) {
|
72 |
+
$setting = array($_POST['setting1'],$_POST['setting2'],$_POST['setting3']);
|
73 |
+
update_option('thisismyurl_php_info', json_encode($setting));
|
74 |
+
}
|
75 |
+
|
76 |
+
if (empty($setting)) {
|
77 |
+
$setting = json_decode(get_option('thisismyurl_php_info'));
|
78 |
+
}
|
79 |
+
|
80 |
+
$settingcount = 0;
|
81 |
+
foreach ($setting as $settingitem) {
|
82 |
+
if ($setting[$settingcount]) {$cb[$settingcount] = 'checked="checked"';}
|
83 |
+
$settingcount++;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
echo '<div class="wrap">
|
88 |
+
<div class="thisismyurl icon32"><br /></div>
|
89 |
+
<h2>'.__('Settings for External Links to New Window','thisismyurl_php_info').'</h2>
|
90 |
+
<div class="postbox-container" style="width:70%">
|
91 |
+
<div class="metabox-holder">
|
92 |
+
<div class="meta-box-sortables">';
|
93 |
+
$php_info = (thisismyurl_php_info_phpinfo_array() );
|
94 |
+
foreach ($php_info as $php_info_section_key => $php_info_section) {
|
95 |
+
|
96 |
+
echo '
|
97 |
+
|
98 |
+
|
99 |
+
<div id="edit-pages" class="postbox">
|
100 |
+
<div class="handlediv" title="'.__('Click to toggle','thisismyurl_php_info').'"><br /></div>
|
101 |
+
<h3 class="hndle"><span>'.__($php_info_section_key,'thisismyurl_php_info').'</span></h3>
|
102 |
+
<div class="inside">';
|
103 |
+
foreach ($php_info_section as $key => $value) {
|
104 |
+
echo "<div class='thisismyurl_php_info_key'>".$key."</div>";
|
105 |
+
echo "<div class='thisismyurl_php_info_value'>".wordwrap($value, 50, "<br />\n",true)."</div>";
|
106 |
+
}
|
107 |
+
|
108 |
+
echo' <div style="clear:both;"></div>
|
109 |
+
</div><!-- .inside -->
|
110 |
+
</div><!-- #edit-pages -->
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
';
|
115 |
+
}
|
116 |
+
echo ' </div><!-- .meta-box-sortables -->
|
117 |
+
</div><!-- .metabox-holder -->
|
118 |
+
|
119 |
+
</div><!-- .postbox-container -->
|
120 |
+
|
121 |
+
<div class="postbox-container" style="width:20%">
|
122 |
+
|
123 |
+
<div class="metabox-holder">
|
124 |
+
<div class="meta-box-sortables">
|
125 |
+
|
126 |
+
<div id="edit-pages" class="postbox">
|
127 |
+
<div class="handlediv" title="'.__('Click to toggle','thisismyurl_php_info').'"><br /></div>
|
128 |
+
<h3 class="hndle"><span>'.__('Plugin Information','thisismyurl_php_info').'</span></h3>
|
129 |
+
<div class="inside">
|
130 |
+
<p>'.__('phpinfo() by Christopher Ross is a free WordPress plugin. If you\'ve enjoyed the plugin please give the plugin 5 stars on WordPress.org.','thisismyurl_php_info').'</p>
|
131 |
+
<p>'.__('Want to help? Please consider translating this pluginto your local language, or offering a hand in the support forums.','thisismyurl_php_info').'</p>
|
132 |
+
<p><a href="http://wordpress.org/extend/plugins/wordpress-php-info/">WordPress.org</a> | <a href="http://thisismyurl.com">'.__('Plugin Author','thisismyurl_php_info').'</a></p>
|
133 |
+
</div><!-- .inside -->
|
134 |
+
</div><!-- #edit-pages -->
|
135 |
+
|
136 |
+
</div><!-- .meta-box-sortables -->
|
137 |
+
</div><!-- .metabox-holder -->
|
138 |
+
|
139 |
+
</div><!-- .postbox-container -->
|
140 |
+
</div><!-- .wrap -->
|
141 |
+
|
142 |
+
';
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
function thisismyurl_php_info_phpinfo_array($return=false){
|
147 |
+
/* Andale! Andale! Yee-Hah! */
|
148 |
+
ob_start();
|
149 |
+
phpinfo(-1);
|
150 |
+
|
151 |
+
$pi = preg_replace(
|
152 |
+
array('#^.*<body>(.*)</body>.*$#ms', '#<h2>PHP License</h2>.*$#ms',
|
153 |
+
'#<h1>Configuration</h1>#', "#\r?\n#", "#</(h1|h2|h3|tr)>#", '# +<#',
|
154 |
+
"#[ \t]+#", '# #', '# +#', '# class=".*?"#', '%'%',
|
155 |
+
'#<tr>(?:.*?)" src="(?:.*?)=(.*?)" alt="PHP Logo" /></a>'
|
156 |
+
.'<h1>PHP Version (.*?)</h1>(?:\n+?)</td></tr>#',
|
157 |
+
'#<h1><a href="(?:.*?)\?=(.*?)">PHP Credits</a></h1>#',
|
158 |
+
'#<tr>(?:.*?)" src="(?:.*?)=(.*?)"(?:.*?)Zend Engine (.*?),(?:.*?)</tr>#',
|
159 |
+
"# +#", '#<tr>#', '#</tr>#'),
|
160 |
+
array('$1', '', '', '', '</$1>' . "\n", '<', ' ', ' ', ' ', '', ' ',
|
161 |
+
'<h2>PHP Configuration</h2>'."\n".'<tr><td>PHP Version</td><td>$2</td></tr>'.
|
162 |
+
"\n".'<tr><td>PHP Egg</td><td>$1</td></tr>',
|
163 |
+
'<tr><td>PHP Credits Egg</td><td>$1</td></tr>',
|
164 |
+
'<tr><td>Zend Engine</td><td>$2</td></tr>' . "\n" .
|
165 |
+
'<tr><td>Zend Egg</td><td>$1</td></tr>', ' ', '%S%', '%E%'),
|
166 |
+
ob_get_clean());
|
167 |
+
|
168 |
+
$sections = explode('<h2>', strip_tags($pi, '<h2><th><td>'));
|
169 |
+
unset($sections[0]);
|
170 |
+
|
171 |
+
$pi = array();
|
172 |
+
foreach($sections as $section){
|
173 |
+
$n = substr($section, 0, strpos($section, '</h2>'));
|
174 |
+
preg_match_all('#%S%(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?(?:<td>(.*?)</td>)?%E%#',$section, $askapache, PREG_SET_ORDER);
|
175 |
+
foreach($askapache as $m)
|
176 |
+
$pi[$n][$m[1]]=(!isset($m[3])||$m[2]==$m[3])?$m[2]:array_slice($m,2);
|
177 |
+
}
|
178 |
+
|
179 |
+
return $pi;
|
180 |
+
}
|
181 |
+
?>
|