SEO and Internet newsnews

Php & Datamining

Encoding Html

Php by category
php code snippets Index Php data Data Mining image 3d Graphism networking Network

Encode Html code into text

Copy and paste the following code into your editor and run it (you should end up with 2 files: one for the form in html and another one in php).
If you want to see the live result, try it here (new window).

Let's first start building an online form in order to input the html text we wish to encode:

Now comes the function to retrieve the content of the form and encode it (encodehtml.php):

Have a look to the source code to see how the string is coded.

If you plan on decoding the string then simply use the html_entity_decode() function (www.php.net/html_entity_decode)

Comments

No comment yet, write the first now
Add Url to Linkstraffic - Website traffic - Affiliates - Site Map