Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
[PHP] In-browser pinging script!
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="DaLightz" data-source="post: 197250" data-attributes="member: 17436"><p style="text-align: center"><span style="font-size: 26px">In-browser pinging script</span></p> <p style="text-align: center"><em>By CookieMonsta</em></p><p></p><p>I've programmed this about 2 years ago. It was one of my first php script to be created. I figured I'd share this since I don't have use for it anymore, and it could maybe help others.</p><p> </p><p><strong>Installation-</strong></p><ol> <li data-xf-list-type="ol">Copy and paste the script below into notepad, or any other word processing application.</li> <li data-xf-list-type="ol">Save as index.php.</li> <li data-xf-list-type="ol">Save the document to htdocs root (using xampp.)</li> <li data-xf-list-type="ol">Now go to <a href="http://localhost" target="_blank">http://localhost</a> - You should see it working.</li> </ol><p></p><p><strong>Configuration-</strong></p><ol> <li data-xf-list-type="ol">Open the document with a word processing application.</li> <li data-xf-list-type="ol">Look for "Site_ip = "<a href="http://www.google.com" target="_blank">www.google.com</a>";"</li> <li data-xf-list-type="ol">Edit "<a href="http://www.google.com" target="_blank">www.google.com</a>" to any other address / ip. (Don't forget the <a href="http://www" target="_blank">www</a>.)</li> <li data-xf-list-type="ol">Save and refresh the page.</li> </ol><p></p><p><strong>The script-</strong></p><p>[PHP]<html></p><p><?php</p><p>/*</p><p>* @author Kris "CookieMonsta"</p><p>*</p><p>* @prj Website ping</p><p>* @file index</p><p>*/</p><p> </p><p>/* Configuration */</p><p>$Site_ip = 'www.google.com'; # Site ip (This will be pinged)</p><p>$Node = 'This is a development node.'; # Add extra nodes like this.</p><p> </p><p> </p><p>/* Script */</p><p>exec("ping " . $Site_ip, $output, $result);</p><p>print_r($output);</p><p> </p><p>/* Ceckup */</p><p> </p><p>if ($result == 0)</p><p>{</p><p> echo "<br><br><br> Status: Ping successful!";</p><p>} else {</p><p> echo "<br><br><br> Status: Ping unsuccessful!";</p><p>}</p><p>?></p><p></html> [/PHP]</p></blockquote><p></p>
[QUOTE="DaLightz, post: 197250, member: 17436"] [CENTER][SIZE=7]In-browser pinging script[/SIZE][/CENTER] [CENTER][I]By CookieMonsta[/I][/CENTER] I've programmed this about 2 years ago. It was one of my first php script to be created. I figured I'd share this since I don't have use for it anymore, and it could maybe help others. [B]Installation-[/B] [LIST=1] [*]Copy and paste the script below into notepad, or any other word processing application. [*]Save as index.php. [*]Save the document to htdocs root (using xampp.) [*]Now go to [url]http://localhost[/url] - You should see it working. [/LIST] [B]Configuration-[/B] [LIST=1] [*]Open the document with a word processing application. [*]Look for "Site_ip = "[url="http://www.google.com"]www.google.com[/url]";" [*]Edit "[url="http://www.google.com"]www.google.com[/url]" to any other address / ip. (Don't forget the [url="http://www"]www[/url].) [*]Save and refresh the page. [/LIST] [B]The script-[/B] [PHP]<html> <?php /* * @author Kris "CookieMonsta" * * @prj Website ping * @file index */ /* Configuration */ $Site_ip = 'www.google.com'; # Site ip (This will be pinged) $Node = 'This is a development node.'; # Add extra nodes like this. /* Script */ exec("ping " . $Site_ip, $output, $result); print_r($output); /* Ceckup */ if ($result == 0) { echo "<br><br><br> Status: Ping successful!"; } else { echo "<br><br><br> Status: Ping unsuccessful!"; } ?> </html> [/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
[PHP] In-browser pinging script!
Top