Ajax software
Free javascripts
↑
Main Page
foreach ($step_2 as $s2)
{
if (preg_match(‘#\{HTML\}#‘, $s2))
{
$return .= preg_replace(‘#\{/?HTML\}#is’, ‘’, $s2);
}
else
{
$return .= nl2br($s2);
}
}
// return HTML markup
return $return;
}
?>
2.
Create a file named
markup.txt
in your
seophp
folder, and type this code in:
{HEADING}Using a Custom Markup Language to Generate Optimized HTML{/HEADING}As we
mentioned earlier, using a WYSIWYG editor frequently presents a problem with regard
to on-page optimization. Frequently, the editors do not generate HTML that uses
tags that adequately delineate the structural meaning of elements on a page. Since
heading tags, such as h1, ul, and strong are indicators of the structure within a
document, not using them will probably {BOLD}{ITALIC}decrease{/ITALIC}{/BOLD} the
rankings of a page, especially when a search engine is relying on on-page factors.
3.
Create a file named
test_markup.php
in your
seophp
folder, and write this code:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
<html>
<head>
<title>Testing HTML Markup Translator</title>
</head>
<body>
<?php
// include custom markup library
require_once ‘include/custom_markup.inc.php’;
// set input file name
$file_name = ‘markup.txt’;
// open markup file from disk
$handle = fopen($file_name, ‘r’);
// check if the files was opened successfully
if ($handle)
{
// read file contents
$markup = fread($handle, filesize(“markup.txt”));
// translate and display custom markup
147
Chapter 6: SE-Friendly HTML and JavaScript
c06.qxd:c06 10:55 147
Ajax software
Free javascripts
→