Ask a Question related to PHP Development, Design and Development.
-
John Smith #1
Check remote server status
My website redirect a certain page to another on an different server because
that (generated) page is always up-to-date.
Only that server isn't stable all the time.
I'm looking for a quick way to check if the server (and the page) is online
(by retrieving the headers?) so that if it isn't I can use redirect to a
less up-to-date page.
Can anyone help me with this???
John Smith Guest
-
Check status of FCS
Hello! I want to build a php-page that can check the status of a FCS-service. Like it is possible through the control panel. For example I... -
Check for File on Remote Server
Hello, I want to check to ensure that a file exists on a remote server before executing other code. I tried: <cfhttp method="get"... -
how can i check and decide the caps Lock status ?
i want to know if the caps lock is turned on right now or not and to turn it on how can i do it ? thanks -
How to check the status of a DB2 Connection
We use DB2CLI. Does any one know if it is possible to check the status of a DB2 Connection (SQLHdbc) before actually using it. This will help in... -
How to check server status using InetCtls.Inet?
Set Inet = Server.CreateObject("InetCtls.Inet.1") Inet.URL = "http://www.yahoo.com/" Inet.AccessType = icDirect Inet.Protocol = icHTTP... -
CountScubula #2
Re: Check remote server status
"John Smith" <someone@nobody.com> wrote in message
news:bve88j$if1$1@news1.tilbu1.nb.home.nl...because> My website redirect a certain page to another on an different serveronline> that (generated) page is always up-to-date.
> Only that server isn't stable all the time.
> I'm looking for a quick way to check if the server (and the page) is$otherPage = implode("",file("http://www.othersite.com/otherpage.html"));> (by retrieving the headers?) so that if it isn't I can use redirect to a
> less up-to-date page.
>
> Can anyone help me with this???
>
>
--
Mike Bradley
[url]http://www.gzentools.com[/url] -- free online php tools
CountScubula Guest
-
John Smith #3
Re: Check remote server status
This gives me the file, but I want to redirect to that server if it's online
by using file() it waits and waits if the server is down.
I did something similar (along time ago) with Perl there I used an
HTTPstatus-request for the file.
"CountScubula" <me@scantek.hotmail.com> schreef in bericht
news:xSzSb.7956$BO6.2722@newssvr29.news.prodigy.co m...> "John Smith" <someone@nobody.com> wrote in message
> news:bve88j$if1$1@news1.tilbu1.nb.home.nl...> because> > My website redirect a certain page to another on an different server> online> > that (generated) page is always up-to-date.
> > Only that server isn't stable all the time.
> > I'm looking for a quick way to check if the server (and the page) is>> > (by retrieving the headers?) so that if it isn't I can use redirect to a
> > less up-to-date page.
> >
> > Can anyone help me with this???
> >
> >
> $otherPage = implode("",file("http://www.othersite.com/otherpage.html"));
>
> --
> Mike Bradley
> [url]http://www.gzentools.com[/url] -- free online php tools
>
>
John Smith Guest
-
CountScubula #4
Re: Check remote server status
ok, if you just want the headers, then it will still wait and wait if the
server is down.
Now, are you refering to server down as the http service or the physical
server itself?
you can try to open a socket to the machine?
Are you trying to see if it is up on every request from your page? not good
idea if so.
try getting the file() its simpler, and do it from a cron job that runs ever
X minutes, thus saving bandwidth, cpu usage etc.. and eliminating any delays
if server is down.
--
Mike Bradley
[url]http://www.gzentools.com[/url] -- free online php tools
"John Smith" <someone@nobody.com> wrote in message
news:bvfrbn$c61$1@news2.tilbu1.nb.home.nl...online> This gives me the file, but I want to redirect to that server if it'sa> by using file() it waits and waits if the server is down.
> I did something similar (along time ago) with Perl there I used an
> HTTPstatus-request for the file.
>
> "CountScubula" <me@scantek.hotmail.com> schreef in bericht
> news:xSzSb.7956$BO6.2722@newssvr29.news.prodigy.co m...> > "John Smith" <someone@nobody.com> wrote in message
> > news:bve88j$if1$1@news1.tilbu1.nb.home.nl...> > because> > > My website redirect a certain page to another on an different server> > online> > > that (generated) page is always up-to-date.
> > > Only that server isn't stable all the time.
> > > I'm looking for a quick way to check if the server (and the page) is> > > (by retrieving the headers?) so that if it isn't I can use redirect toimplode("",file("http://www.othersite.com/otherpage.html"));> >> > > less up-to-date page.
> > >
> > > Can anyone help me with this???
> > >
> > >
> > $otherPage =>> >
> > --
> > Mike Bradley
> > [url]http://www.gzentools.com[/url] -- free online php tools
> >
> >
>
CountScubula Guest
-
John Smith #5
Re: Check remote server status
I meant the service.
Thanks I will try that and of course I won't check this on every page.
I don't if I can use a cron job since the server is not hosted by me.
"CountScubula" <me@scantek.hotmail.com> schreef in bericht
news:wsKSb.18278$871.1368@newssvr27.news.prodigy.c om...good> ok, if you just want the headers, then it will still wait and wait if the
> server is down.
>
> Now, are you refering to server down as the http service or the physical
> server itself?
>
> you can try to open a socket to the machine?
>
> Are you trying to see if it is up on every request from your page? notever> idea if so.
>
> try getting the file() its simpler, and do it from a cron job that runsdelays> X minutes, thus saving bandwidth, cpu usage etc.. and eliminating anyto> if server is down.
>
>
> --
> Mike Bradley
> [url]http://www.gzentools.com[/url] -- free online php tools
> "John Smith" <someone@nobody.com> wrote in message
> news:bvfrbn$c61$1@news2.tilbu1.nb.home.nl...> online> > This gives me the file, but I want to redirect to that server if it's> > by using file() it waits and waits if the server is down.
> > I did something similar (along time ago) with Perl there I used an
> > HTTPstatus-request for the file.
> >
> > "CountScubula" <me@scantek.hotmail.com> schreef in bericht
> > news:xSzSb.7956$BO6.2722@newssvr29.news.prodigy.co m...> > > "John Smith" <someone@nobody.com> wrote in message
> > > news:bve88j$if1$1@news1.tilbu1.nb.home.nl...
> > > > My website redirect a certain page to another on an different server
> > > because
> > > > that (generated) page is always up-to-date.
> > > > Only that server isn't stable all the time.
> > > > I'm looking for a quick way to check if the server (and the page) is
> > > online
> > > > (by retrieving the headers?) so that if it isn't I can use redirect> a> implode("",file("http://www.othersite.com/otherpage.html"));> > > > less up-to-date page.
> > > >
> > > > Can anyone help me with this???
> > > >
> > > >
> > >
> > > $otherPage =>> >> > >
> > > --
> > > Mike Bradley
> > > [url]http://www.gzentools.com[/url] -- free online php tools
> > >
> > >
> >
>
John Smith Guest
-
John Smith #6
Re: Check remote server status
I've used fsockopen($host, 80) to make a HEAD-request
It works fine.
It doesn't wait and wait if the server is down because of the connection
between the servers is so short and fast. (at least not for 1 request)
I also buffer the result so that it's checked only when the server isn't
down.
If it's down it will check only once each X minutes en the next X minutes
will be the other page.
ThanX for the help I've never used sockets before with PHP
p.s. perhaps PHP needs a better and faster way to check headers.
"CountScubula" <me@scantek.hotmail.com> schreef in bericht
news:wsKSb.18278$871.1368@newssvr27.news.prodigy.c om...good> ok, if you just want the headers, then it will still wait and wait if the
> server is down.
>
> Now, are you refering to server down as the http service or the physical
> server itself?
>
> you can try to open a socket to the machine?
>
> Are you trying to see if it is up on every request from your page? notever> idea if so.
>
> try getting the file() its simpler, and do it from a cron job that runsdelays> X minutes, thus saving bandwidth, cpu usage etc.. and eliminating anyto> if server is down.
>
>
> --
> Mike Bradley
> [url]http://www.gzentools.com[/url] -- free online php tools
> "John Smith" <someone@nobody.com> wrote in message
> news:bvfrbn$c61$1@news2.tilbu1.nb.home.nl...> online> > This gives me the file, but I want to redirect to that server if it's> > by using file() it waits and waits if the server is down.
> > I did something similar (along time ago) with Perl there I used an
> > HTTPstatus-request for the file.
> >
> > "CountScubula" <me@scantek.hotmail.com> schreef in bericht
> > news:xSzSb.7956$BO6.2722@newssvr29.news.prodigy.co m...> > > "John Smith" <someone@nobody.com> wrote in message
> > > news:bve88j$if1$1@news1.tilbu1.nb.home.nl...
> > > > My website redirect a certain page to another on an different server
> > > because
> > > > that (generated) page is always up-to-date.
> > > > Only that server isn't stable all the time.
> > > > I'm looking for a quick way to check if the server (and the page) is
> > > online
> > > > (by retrieving the headers?) so that if it isn't I can use redirect> a> implode("",file("http://www.othersite.com/otherpage.html"));> > > > less up-to-date page.
> > > >
> > > > Can anyone help me with this???
> > > >
> > > >
> > >
> > > $otherPage =>> >> > >
> > > --
> > > Mike Bradley
> > > [url]http://www.gzentools.com[/url] -- free online php tools
> > >
> > >
> >
>
John Smith Guest



Reply With Quote

