How to show if a link to a website is "live" or not

Discussion in 'Scripts' started by lazerweb, Jul 9, 2006.

  1. #1
    Hi everyone,

    I am currently serving a website from my own computer at home - to the web. I link to this website from another website which is on my ISP's server because my computer is not always on.

    Does anyone know if there is a script that would be able to show the viewers if my site is "live" or not? Any help is mopst appreciated!

    Thanks
     
    lazerweb, Jul 9, 2006 IP
  2. dcole07

    dcole07 Peon

    Messages:
    135
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would include a script from your computer on the ISP website, then put that in an if statement, so it would be like:

    if(you can get the script)
    {
    // live link
    print "<a href='...'>Link</a>";
    }
    else
    {
    // not live link
    print "site is down!"
    }

    something like that..
     
    dcole07, Jul 9, 2006 IP
  3. lazerweb

    lazerweb Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'll give it a go!
     
    lazerweb, Jul 9, 2006 IP
  4. livingearth

    livingearth Well-Known Member

    Messages:
    1,469
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    140
    #4
    A javascript include from your computer that simply writes the link itself would work...
    Wouldn't even need an if statement...
     
    livingearth, Jul 9, 2006 IP
  5. lazerweb

    lazerweb Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That sounds great livingearth, but I have no idea how to write javascript. Would you be able to give me an example perhaps?
    Thanks
     
    lazerweb, Jul 9, 2006 IP