Remote Helper (Aide à l'interaction inter-serveur)

Cet helper est fait en sorte de récupérer le statut de fichiers et liens étrangers au serveur local.

Méthodes

Status

status($url) retourne le le code de statut HTTP de l'URL. Cette méthode à besoin de:

  • [string] $url l'adresse à laquelle vous voulez récupérez le statut
  • retourne [string|bool] le code de statut s'il existe ou FALSE

Exemple

echo remote::status('http://www.creermonjeu.com');
echo remote::status('http://trac.creermonjeu.com');
echo remote::status('http://docs.creermonjeu.com');
echo remote::status('http://www.creermonjeu.com/idontexist');

Cela ressemblera à:

302 // Found
301 // Moved Permanently
200 // OK
404 // File Not Found
helpers/remote.txt · Dernière modification: 08/03/2011 10:45 par alban
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0