Customizing SMF > SMF Coding Discussion
i don't know how to put java script
fazeaces aka rox:
Hello i'm new i own a minecraft website well i'm a great coder but i don't know how to use smf I just wanna know how to put this java code in
--- Code: ---<?php error_reporting(E_ERROR); $fp = fsockopen('cenacraftserver.zapto.org', 25565, $errno, $errstr, 1); if (!$fp) { echo 'no'; } else { echo 'yes'; fclose($fp); } ?>
--- End code ---
this code is 2 tell if my server is up tell me where 2 put it as fast as you can
Orangine:
where you want to display it?
The Craw:
That isn't JavaScript. All that will do is open a PHP socket to cenacraftserver.zapto.org and output "yes" or "no" depending on the connection status. If you're following a tutorial or something, a link would be useful so we know what you're trying to accomplish, and can advise accordingly.
MrPhil:
Obviously there would be no point in running this PHP script on cenacraftserver.zapto.org -- if that's your server, nothing will be run if it's down, and you'll get "yes" if it's up. I hope that's a different server that you need access to for some purpose...
--- Quote ---well i'm a great coder
--- End quote ---
... and you can't tell PHP from Java (or Javascript)? And please Preview your posts -- you would have seen that your code is all on one line and therefore very difficult to read.
fazeaces aka rox:
i wanna upload it on the main page
Navigation
[0] Message Index
[#] Next page
Go to full version