Skip to content


E-posta kodifikatu

Lanean webguneetan jartzen ditugun e-postak kodifikatu behar ditugu. Hau egiteko e-postako karaktere guztiak html moduan idazten dira, beraz, &#XXX; non XXX kode zenbakia den. Lantxo hau egiteko funtzio bat sortu dut.

function karaktereakHtmlan( $testua ){
  $zLetra = strlen( $testua );
  for($i=0;$i< $zLetra;$i++):
    $emaitza .= "&#".ord(substr($testua, $i, 1)) .";";
  endfor;

  return $emaitza;
}

Nire iritziz lan hau hartzea ez du ezertarako balio, ze ni 5 minutu tardatu baditut funtzio hau sortzen, spambot bat egin duenak minutu bat tardatuko du kontrakoa sortzen.
Hala ere zure e-posta kodifikatzeko gogoa baduzu, erabili hau.

Posted in Php.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.