while($addr !~ /^([O1]?\d\d?|2[0-4]\d|25[0-5])\.([O1]?\d\d?|2[0-4]\d|25[0-5])\.([O1]?\d\d?|2[0-4]\d|25[0-5])\.([O1]?\d\d?|2[0-4]\d|25[0-5])$/){ print “Please give the IP address of the remote server:\n“; $addr = get_answer(); }
View Extraire le texte entre les balises depuis une page html $foo = strip_tags($source, ‘<body>, <a>, <br>, <strong>, <b>, <i>, <em>, <font>’); ereg (“<body(+)>(.+)</body>”, $foo, $regs); echo $regs;Read More
View Fonction de mise en forme de texte pour utilisation dans une URL (Par exemple pour de l’URL Rewriting) function convert_for_uri($text) { // Définition du séparateur define(“SEPARATOR”, “-“); $tofind = “àáâãäåòóôõöøèéêëçìíîïùúûüÿñ”; // Lettre accentuées $replac = “aaaaaaooooooeeeeciiiiuuuuyn”; // Equivalant...Read More
View Firefox 3 CSS hack .foo, x:-moz-any-link { } /* FireFox 2 */ .foo, x:-moz-any-link, x:default { } /* FireFox 3 */ html>/**/body .foo, x:-moz-any-link, x:default { } /*...Read More
View Create a repository via the CD/DVD or ISO on Redhat based systems --Mounting the CD/DVD-- #mount -t iso9660 /dev/cdrom /media/cdrom (adapt this to your environement) --Mounting the ISO image-- #mount -o loop /path/to/file.iso /path/to/isodest (adapt this...Read More