The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Need help - custom ping script!
Using this mod I want to imbed a custom Ping script into the page.
The script works fine, it pings a web address or IP fine however, the results are outputted to the very top of the web page, above the logo. I want the results to output right underneath the field that you type the web address/IP into. Here is the ping script: Code:
<?php error_reporting(E_ALL & ~E_NOTICE); define('NO_REGISTER_GLOBALS', 1); define('THIS_SCRIPT', 'page_ping'); // change this depending on your filename $phrasegroups = array( ); $specialtemplates = array( ); $globaltemplates = array( 'page_ping', ); $actiontemplates = array( ); chdir('/home/USERNAME/public_html/'); require_once('./global.php'); // Start Ping $_ip = $_SERVER['REMOTE_ADDR']; if($_GET['do'] == 'ping') { $_domain = $_POST['domain']; echo "<pre>"; system ("ping -w 10 -c 5 $_domain"); echo "</pre>"; } // End Ping $pingresult = $_POST['ping -w 10 -c 5 $_domain']; $navbits = array(); $navbits[$parent] = 'Ping'; $navbits = construct_navbits($navbits); eval('$navbar = "' . fetch_template('navbar') . '";'); eval('print_output("' . fetch_template('page_ping') . '");'); ?> Here is my template: Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Ping</td> </tr> <tr> <td class="alt1"> Enter the IP Address or domain name of the server that you want to ping.<br> <form method='post' action='page_ping.php?do=ping'><input type='text' name='domain' value=''> <input type='submit' value='Ping'></form> <br /><br /> $pingresult <br /> </td> </tr> </table> $footer </body> </html> What do I need to do to get this working correctly? I've tried many different things to get this working - currently this seems to be the most 'functional' for lack of a better word. Any help would be greatly appreciated. Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|