php online/offline

Results 1 to 20 of 20
  1. #1
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    php online/offline

    happy hardcore i copied and tried ur php script for server status
    i put this into my site

    Code:
      <?php 
     
    /*change your server's name and host*/ 
    $server['name'] = "BloodPT"; 
    $server['host'] = "87.90.185.247"; 
    $server['port'] = "10007"; 
     
     
    /*no need to change the further code*/ 
    $connection = @fsockopen($server['host'], $server['port'], $ERROR_NO, $ERROR_STR, (float)1.5); 
     
    echo "{$server['name']} PristonTale server is "; 
     
    if($connection) 
    { 
        fclose($connection); 
        echo "<font>Online!</font>"; 
    } 
    else 
    { 
        echo "<font>Offline!</font>"; 
    } 
    ?>
    and all that happend was is showd green righting saying "echo "<font> Online!</font>"; }else { echo "<font> Offline! </font>";}?>

    it was inside a html document.
    i dno how im spose 2 do it :(


    2ndly.
    i tried the froggpt registration script and the php reg script from the rft section and i can get neither to work :( can some1 please explain to me how i am to set them up?
    i use dreamweaver mx2004 for my web development

    and final question.
    for my site i have a menu. but i want that menu to be at the top of the page through all the pages with a border down the side and make it stay uniform across all my websties pages.
    any one able 2 tell me how i go by that?


  2. #2
    Account Upgraded | Title Enabled! Superman666 is offline
    MemberRank
    Sep 2006 Join Date
    AZ USALocation
    662Posts

    Re: php online/offline

    You cant combine html and php, unless you inframe it

  3. #3
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    how do i do that?

  4. #4
    Alpha Member DarkKnightH20 is offline
    MemberRank
    Jul 2006 Join Date
    Magic SchoolbusLocation
    1,673Posts

    Re: php online/offline

    To simplify life do the following--

    You need to save the file with a *.php extension. For this example, call it "poop.php".

    You can have an HTML page call upon this page using an iframe.

    <iframe src="http://www.pork.com/poop.php" height=100% width=100%>

    You can remove the iframe's border and all that too if you want, but I'll let ya google it.

    Mind you, you can include HTML with the php, but it's annoying to do since you have to modify some tags (insertion of "/"s, restrictions on either 's or "s, yada yada).

    Oh, and one more thing -- Depending on your host, you may or may not even have PHP support (or you may have limited support). But if you have a real host, then that usually is not the case. As statedm try naming it with a php extension.

  5. #5
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    so just iframe it?
    sounds tough:P

    can make them in dreamweaver?
    is the 100% width / height 100% of the page or is that spose 2 b pixels?

  6. #6
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    failed -.-
    check attached image
    Attached Thumbnails Attached Thumbnails failed.jpg  

  7. #7
    Alpha Member DarkKnightH20 is offline
    MemberRank
    Jul 2006 Join Date
    Magic SchoolbusLocation
    1,673Posts

    Re: php online/offline

    100% of the page. You don't dont really need to iframe it, but if you're incorporating it with your website, that's an easy way of doing it. Also, you could just rename your *.htm or *.html layout to a *.php and incorporate it within your layout. Just gotta do a bit of of configuring.

    Do you have a free host?

  8. #8
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    yea. well look at that it does in that thumbnail.
    i think the php script is wrong.
    and if i link it to

    File Viewer
    it comes up witht he page "download file"
    its bizarre.

  9. #9
    Alpha Member DarkKnightH20 is offline
    MemberRank
    Jul 2006 Join Date
    Magic SchoolbusLocation
    1,673Posts

    Re: php online/offline

    The script is correct.

    Your server cannot support PHP files (or so I presume since your symptoms relate to that).

    This is a common issue when when dealing with free webhosting services. Are you paying for hosting? If no, double check to see if they support php (and if they do, it's likely to be limited and not allow this script). If you are paying for hosting (that includes PHP support), then check your C-Panel to verify that php is enabled on the account.

  10. #10
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    yea but that jpg i attached.
    that was wen it was directing at it in my computer.

    the coding must be wrong for it to be doing that.

    oso what free hosts allow php?

  11. #11
    Alpha Member DarkKnightH20 is offline
    MemberRank
    Jul 2006 Join Date
    Magic SchoolbusLocation
    1,673Posts

    Re: php online/offline

    It was directly from your computer? Then that was the issue.

    Personal Computers do not read PHP scripts as web servers do. They have no support for reading the language and processing it (unless you download the components).

    Not sure which free hosts allow php, but I'm sure a good portion. What you need to do is find a free host that allows php AND will allow the php to use the fsockopen function. 'Course, a real host is ideal if you can spare $5 or so a month.

  12. #12
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    why wont my pc read it?
    i got dreamweaver which has associated the file type O.o

    could u test? like upload it to urs for a test? and delete afta if u wish?

  13. #13
    Alpha Member DarkKnightH20 is offline
    MemberRank
    Jul 2006 Join Date
    Magic SchoolbusLocation
    1,673Posts

    Re: php online/offline

    I've already tested it (but used it for a WoW server). PC's don't automatically know how to read some languages. PHP is a fine example, as is perl.

    Dreamweaver associates with it though because PHP is a web-based language that often times is interwined with HTML.

    Unlike HTML, PHP requires additional support to be dealt with. Web-Servers have components that perform the given operation within the PHP file. Unlike PHP, HTML is sent 100% to the person's browser. The browser gets all the HTML data and displays it. With PHP, the browser does not get sent the entire script. Instead, the Web-Server compiles the information AND THEN sends it. So the browser would get sent "Server Online" only or "Server Offline" (as well as any HTML that had been included with the file)

  14. #14
    Account Upgraded | Title Enabled! Superman666 is offline
    MemberRank
    Sep 2006 Join Date
    AZ USALocation
    662Posts

    Re: php online/offline

    bcuz you need apache or xammp to host your website then, and if you do that you also must remember that you would have to convert all your sites to php. Its not that hard just make then php. or asp.

  15. #15
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    -.- i bought a domain n found out they dont support php -.-

  16. #16
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    perthaps some1 could tell me the ratio of shop price : npc price?
    if i wanna make an item npc for 1kk it need to b shopprice of? 10kk? or what?

  17. #17
    I am the Reaper HappyHardcore is offline
    MemberRank
    Aug 2004 Join Date
    Wicked GardenLocation
    752Posts

    Re: php online/offline

    I only posted that script, I did not write it, just to let you all know. I forget who wrote it, but not my work.

  18. #18
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    Quote Originally Posted by Phatkone View Post
    perthaps some1 could tell me the ratio of shop price : npc price?
    if i wanna make an item npc for 1kk it need to b shopprice of? 10kk? or what?

    i workd out the php.

    plz can some1 answer that?

  19. #19
    Alpha Member DarkKnightH20 is offline
    MemberRank
    Jul 2006 Join Date
    Magic SchoolbusLocation
    1,673Posts

    Re: php online/offline

    The script works great, HappyHardcore.

    Not sure phatkone, but that'd be a good different topic.

  20. #20
    RZA-PT | KilroyPT Phatkone is offline
    MemberRank
    Aug 2007 Join Date
    SydneyLocation
    945Posts

    Re: php online/offline

    yea i found my errors were wwith the colours but fixd cheers for that happy.
    kkz dark



Advertisement