w00t! Posted March 12, 2006 at 05:36 PM Report #17962 Posted March 12, 2006 at 05:36 PM Precisava de um código que verificasse se 'x' site está UP ou Down, se tiver UP faz 'x' acção, e Down fazia outra.. Alguem arranja, sff? 😄
David Pintassilgo Posted March 12, 2006 at 06:07 PM Report #17968 Posted March 12, 2006 at 06:07 PM Eu já vi por aqui pelo forum um codigo qualquer que verificava se URL era valido. Deixa lá ver se acho... edit 😄 é para php http://www.portugal-a-programar.pt/index.php?showtopic= cool stuffs to check. http://blog.zxcoders.com//
electron++ Posted January 5, 2008 at 02:59 PM Report #158041 Posted January 5, 2008 at 02:59 PM Esse código é muito simples! 1º tens que te conectar ao host em questão,e podes faze-lo por IP ou por URL 2º Se foi estabelecida conexão, então é porque o host esta online. 3º Podes ainda enviar um request HTTP e por exemplo verificar se a lagura de banda do site foi excedida pesquisando por Strings como "This website has execeded the Bandwitch". “Quanto mais aprendo, mais me dou conta da minha ignorância.” Albert Einstein
Cybernavigator Posted January 5, 2008 at 04:57 PM Report #158081 Posted January 5, 2008 at 04:57 PM Bom em vb.net é muito simples If My.Computer.Network.IsAvailable Then Try If My.Computer.Network.Ping("http://www.portugal-a-programar.org") Then MsgBox("O site está on.") Else MsgBox("O site está off.") End If Catch ex As Exception MsgBox(ex.Message) End Try Else MsgBox("Não há rede!") End If Melhores cumprimentos,João Lopes***Esta mensagem foi escrita ao abrigo do novo Acordo Ortográfico***
Gooden Posted March 5, 2008 at 12:24 PM Report #170643 Posted March 5, 2008 at 12:24 PM Bom em vb.net é muito simples If My.Computer.Network.IsAvailable Then Try If My.Computer.Network.Ping("http://www.portugal-a-programar.org") Then MsgBox("O site está on.") Else MsgBox("O site está off.") End If Catch ex As Exception MsgBox(ex.Message) End Try Else MsgBox("Não há rede!") End If este é um dos motivos pela qual muitas pessoas usam .net a sua utilização neste tipo de casos e muito facil 😞
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now