Jump to content
  • 0

(Help) PHP WP code


Question

Posted

First of all good evening. :)

 

I've installed wp on my webhoster everything runs ok...I wanted to add some scripts to my server website. First i installed a plugin named Exec php which should allow php codes in wp. i've wrote a php code as a text widget.

<?php
    print'<table width="150">';
    $server  = "88.223.84.82";
    $portg   = "7777";
    $portl   = "9014";
    $timeout = "5";

    if ($server and $port and $timeout) {
        $game =  @fsockopen("$server", $portg, $errno, $errstr, $timeout);
        $login =  @fsockopen("$server", $portl, $errno, $errstr, $timeout);
    }
    print'<tr><td align="center"><strong>Server Status</strong></td></tr>';
    if($login) { print'<tr><td>Login:</td><td><font color="#00FF00"><strong> Online</strong></font><br><br></td></tr>'; }
    else { print'<tr><td>Login:</td><td><font color="#FF0000"><strong> Offline</strong></font><br><br></td></tr>'; }
    if($game) { print'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
    else { print'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
    print'</table>';
?>

 

this it shows me up.

Offline

Server Status

Login: Offline

Game:

 

Why it shows server is offline?? Ports are opened no firewall and server is definetly online. same happens with other scripts for online/offline.

Now im sitting since 2 days on that -.- and i still don't get what im doing wrong. LF help

4 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...