Main Menu
collapse

Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

User Info

Welcome Guest.
Please log in.

Who's Online

  • Dot Guests: 1284
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]


Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

PHP block broken after update

Started by mons00n, November 05, 2010, 05:57:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mons00n

We're running SMF 2.0 RC4 and up until today was running SP 2.3.2, which is now updated to 2.3.3

We had a small PHP script to check if a server was online or not that worked fine in a custom php block:

<?
function servstat($name, $host, $port) {
?>
<tr>
<td> <?echo($name); ?> </td>
<td>  -  </td>
<?
@$socket = fsockopen($host, $port,$errno,$errstr,5);
if(!$socket) {
  ?> <td> <b> <font color = "red"> Offline! </font> </b> </td><?
} else {
  fclose($socket);
  ?> <td> <b> <font color = "green"> Online! </font> </b> </td><?
}
?> </tr> <?
}
?> <table border = "0" align="center">
<?
servstat("MC Server", "IPADDRESS",PORT);
servstat("Vent Server", "IPADDRESS",PORT);
?> </table>


which worked fine, but after the update it only shows a blank box.  Does anyone have any ideas why this stopped working after the update of SP?  Thanks for your time!

Nathaniel

SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

mons00n

thanks for dealing with my php ignorance =)

worked like a charm!