Re: I want to know if some link is online

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesús Alain Rodríguez Santos wrote:
I would like to know if a web is online, a have this code:

enlace.php

<?
$vivo = "verde.gif";
$muerto = "rojo.gif";

$enlinea = fopen("$enlace", "r");

Why not use file_exists()? Also, you probably want to use $_GET['enlance'] rather than $enlance.

             if (!$enlinea){
                header("Location: $muerto");
                }

You need to specify an absolute URI here (http://www.example.com/myimage.gif for example).

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux