PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
"Offline/Online" Server Status PHP Code.

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Custom Script Releases
Display posts from previous:   

Author Message
MontuZ
Distro Developer


Joined: 10 Feb 2006
Posts: 293
Location: Myrtle Beach, South Carolina

PostPosted: Fri Feb 10, 2006 12:53 pm    Post subject: "Offline/Online" Server Status PHP Code. Reply with quote

This actually took me awhile to find and figure out because I don't have any clue about coding in php. Any other notes that's needed here that I forgot, or didn't know about please post them here for everyone. And if anyone knows anyother methods of doing this, again please post.

Code:

<?php

error_reporting(0); //If your server is offline, this will keep it from printing an error.

    $fp = fsockopen("POLIP", POLPORT, $errno, $errstr, 1 );
    if (!$fp) {
    echo "Put your HTML Code here. For Offline";
    }
    else {
    echo "Put your HTML Code here. For Online";
    fclose($fp);
    }
?>


Last edited by MontuZ on Fri Feb 10, 2006 3:07 pm; edited 2 times in total

Author Message
Tritan



Joined: 04 Feb 2006
Posts: 136
Location: Illinois, USA

PostPosted: Fri Feb 10, 2006 2:32 pm    Post subject: Reply with quote

I considered trying to implent this into my shard and website. The only reason I have not tried yet is because my website is remotely hosted.

Can this still be done?

My website has support for PhP which I use for my message boards only.

Author Message
MontuZ
Distro Developer


Joined: 10 Feb 2006
Posts: 293
Location: Myrtle Beach, South Carolina

PostPosted: Fri Feb 10, 2006 3:03 pm    Post subject: Reply with quote

It 'should' work. Just make sure you're using .php where you put this code. You can take a normal html file and convert it over to .php I use Dreamweaver to do that) and paste the code where you want it to display the online/offline.

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Mon Feb 13, 2006 2:25 am    Post subject: Reply with quote

Check this out.

http://www.lostsoulsshard.org/modules.php?name=Downloads&op=getit&lid=46

and this

http://www.lostsoulsshard.org/modules.php?name=Downloads&op=getit&lid=10

Author Message
AasanDar



Joined: 02 Feb 2006
Posts: 18
Location: Beaverton, OR, USA

PostPosted: Mon Feb 13, 2006 10:32 am    Post subject: Reply with quote

OMG MUAD DIB!!! I've been trying to find you forever. Please hit me up on AIM: AasanDar -- MSN: Nightfall_101@hotmail.com -- E-mail: dustin.dubois@gmail.com (dont e-mail the hotmail) ..

Also..

I've been trying to use those PHP scripts of yours.. but the two that you linked to.. are broken downloads of some sort. I just get a page full of gibberish. I've tried it multiple times from FireFox and IE.



Also, why I wanted to contact you, was about the rest of your PHP-Nuke scripts.. so if you have time.. please give me a ring.

Thanks much.

-Aasan

Author Message
CWO



Joined: 04 Feb 2006
Posts: 684
Location: Chicago, IL USA

PostPosted: Mon Feb 13, 2006 3:56 pm    Post subject: Reply with quote

both links work fine for me...

Author Message
AasanDar



Joined: 02 Feb 2006
Posts: 18
Location: Beaverton, OR, USA

PostPosted: Mon Feb 13, 2006 6:08 pm    Post subject: Reply with quote

I have no clue. I've tried Firefox and IE, cleared the cache/cookies, restarted many times.. they never work =/

Author Message
blah



Joined: 02 Feb 2006
Posts: 12

PostPosted: Mon Feb 13, 2006 7:50 pm    Post subject: Reply with quote

and what about right mouse button and 'save as..'?
I have the same problem as yours with every .rar archive when i 'left click' it, but i can always download it.

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Tue Feb 14, 2006 3:04 am    Post subject: Reply with quote

Nice to see you too aas, lol.

Give me a couple weeks mate, so I can get my PC here. Work has me traveling now (Indianapolis, IN atm). Next is either New York or Florida during the summer after I leave Indy.

Author Message
AasanDar



Joined: 02 Feb 2006
Posts: 18
Location: Beaverton, OR, USA

PostPosted: Tue Feb 14, 2006 7:07 am    Post subject: Reply with quote

Good deal man, take you're time.

And if anybody feels like it.. it would be cool if someone were to download the files at the following links and e-mail them to me =)

http://www.lostsoulsshard.org/modules.php?name=Downloads&op=getit&lid=46

http://www.lostsoulsshard.org/modules.php?name=Downloads&op=getit&lid=10

dustin.dubois@gmail.com

Author Message
tao4mike



Joined: 21 Feb 2006
Posts: 4
Location: Langley, SC USA

PostPosted: Tue Feb 21, 2006 6:50 am    Post subject: Reply with quote

seems when you get the gibberish (which my firefox does as well) you can just choose FILE > SAVE PAGE AS and it will save the file as whatever.rar and you are good to go..hope this helps Smile

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Tue Feb 21, 2006 1:25 pm    Post subject: Reply with quote

I posted it here on the forums for all the freaks who can't download it from there (Yes aas, we all know you are a freak Wink )

Author Message
CWO



Joined: 04 Feb 2006
Posts: 684
Location: Chicago, IL USA

PostPosted: Tue Feb 21, 2006 6:44 pm    Post subject: Reply with quote

The reason is most likely that the file association is off in the registry. Internet Explorer and Firefox are reading it most likely as either a text file or something it can process like an HTML file...

First thing I would check is in the registry under HKEY_CLASSES_ROOT/.rar

if it contains anything other than the "Default" value (If you installed WinRAR, Default will have the value WinRAR.. this is OK), including other subkeys or values, first, Export a backup of your registry values of course, then delete them and retry downloading the file.

Author Message
AasanDar



Joined: 02 Feb 2006
Posts: 18
Location: Beaverton, OR, USA

PostPosted: Thu Feb 23, 2006 7:46 pm    Post subject: Reply with quote

Hey thanks guys. My roommate downloaded them on his computer and it worked fine.. so I just copied it from him.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Custom Script Releases All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty