pub YouXOR

Language PHP : Hypertext Preprocessor

 Charge moyenne sur 1mn : 0.39 Charge moyenne sur 5mn : 0.39 Charge moyenne sur 15mn : 0.37


PHP

PHP is a popular general-purpose scripting language that is particularly suited for web development.

Fast, flexible and pragmatic, PHP is made for any blog or for all the most popular sites in the world.

The word PHP or programming language contained in web pages and executed on servers, they return the result directly to the client who can never see the source. Allows you to create dynamic web pages.

PHP.Net © 2001-2020 The PHP Group: Language Reference

Predefined PHP classes to make our life easier :)






Site user blocks : Account info / user rights / summary

Encoder un lien de type mailto

Comment-faire pour encoder un lien de type mailto.

Informations :

Dates
  • Publish : : Thursday 14 october 2004
  • Modification : Thursday 01 september 2011

  • 1109 views

Share :

P' tite fontion qui permet d'encoder un lien mailto (adresse email), pour éviter à nos utilisateurs de se faire spammer.

Script avec 12 lignes

001[php]
002 function mailCrypt($nemail)
003{
004    $encoded = bin2hex("".$nemail."");
005    $encoded = chunk_split($encoded, 2, '%');
006    $encoded = '%' . substr($encoded, 0, strlen($encoded) - 1);
007
008    return $encoded;
009}
010
011echo mailCrypt("user@domaine.com"); 
012[/php]

on pourait faire aussi :

Script avec 24 lignes

001[php]
002function lienMail($email)
003{
004    $encoded = bin2hex("".$email."");
005    $encoded = chunk_split($encoded, 2, '%');
006    $encoded = '%' . substr($encoded, 0, strlen($encoded) - 1);
007
008    if (eregi("@" ,$email))
009    {
010        $transforme = ereg_replace("@" ," AT " ,$email);
011    }
012    
013    if (eregi("." ,$email))
014    {
015        $transforme = ereg_replace("." ," DOT " ,$email);
016    }
017    
018    $mail = '<a href="mailto:'.$this→mailto($email).'">'.$transforme.'</a>';
019
020    return $mail;
021}
022
023echo lienMail("user@domaine.com");
024[/php]

ok :D






Author of the page

O.Romain.Jaillet-ramey

O.Romain.Jaillet-ramey

  • Firstname : Olivier Romain Luc
  • Lastname : : Jaillet-ramey
  • Arrived on tuesday 19 october 1976 (1976/10/19 00:00)
    49 years activity !

ZW3B's LAB3W The Web radios 🎶

Date : 2026/06/15 12:04:36 to 2026/06/19 12:04:36

Translate this page with Google





Use API Youtube : Google Privacy Policy and Youtube Terms of Use - API Dailymotion : Terms and Conditions (the "T&Cs")

Theme light / dark. - Generated with ZW3B 7.1.2 : The Web Sites Management System (WSMS)
© 2026 Web application created by LAB3W O.Romain Jaillet-ramey : Web and networks laboratory - InterNet engineering

Français English Español العربية


Comming Soon (◕‿◕) YouQbit.com YouXOR.com YouPredator.com YouTerminator.com ⛔🔜


IDN : IP❤︎10 ' IPv10.Net



Load page: 2,8172471523285