~" + "~";
} else {
prevmy_res = document.getElementById("my" + "res").innerHTML;
document.getElementById("my" + "res").innerHTML = "~" + "~";
}
var ourfile;
for (var iy = 0; iy < files.length; iy++) {
ourfile = files[iy];
}
var numi;
for (var i = 0, f; f = files[i]; i++) {
bigf[bigf.length] = f.name;
document.getElementById("url").value = f.name;
bigi = eval(1 + i);
file = f;
start = 0;
fcont = "";
stop = file.size - 1;
readers[readers.length] = new FileReader();
imgmode = "n"; /' . '/"y";
readers[readers.length - 1].onloadend = function(evt) {
if (evt.target.readyState == FileReader.DONE) {
var xfcont=evt.target.result;
var thosewordscnt = 0, poff=0, coff=0, thosewords = xfcont.split(String.fromCharCode(32));
var findwordscnt = 0, cfinds, rconts, cfind = "0", huhv, pref="", ihuh, ht;
var fws, fwsc="", rcont = " ", bit;
/' . '/var thoselines = xfcont.split(String.fromCharCode(10));
var ourwords, ourwordcnt = 0;
var endtt = document.getElementById("start").value.substring(0,1) + document.getElementById("ctag").value;
var endd = document.getElementById("start").value.substring(0,1).replace("<",">").replace("[","]").replace("{","}").replace("(",")");
var ourat = document.getElementById("attrib").value;
thoselines = xfcont.split(document.getElementById("start").value.substring(0,1) + document.getElementById("ptag").value);
if (ourat == "") {
cfind = eval(thoselines.length - 1);
} else {
cfind = 0;
for (var jjjjk=1; jjjjk;" + document.getElementById("url").value + "~" + eval(thoselines.length - 1 - poff) + "~" + thosewordscnt + "~" + cfind + "~" + eval(rcont - coff) + "~" + "~";
} else {
document.body.innerHTML = document.body.innerHTML.replace("~" + "~", ";" + document.getElementById("url").value + "~" + eval(thoselines.length - 1 - poff) + "~" + thosewordscnt + "~" + cfind + "~" + eval(rcont - coff) + "~" + "~");
}
var sofar = document.getElementById("my" + "res").innerHTML;
var sofars = sofar.split(";");
var fwcnt = 0, ht, fto2;
var sofarlw;
var ix = eval(sofars.length - 1);
for (var j=1; jFilename is ", escape(f.name), " ... Type is (", f.type || "n/a", ") ... Date is ",
f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : "n/a", " ... Size is ",
f.size, " bytes ... Total (Relevant) Parent/Child tag counts are ","( )/", "", "", " ... Total Child tag count Within Parent Tag is ", "", " ", "", " ", "", " ",
"");
blob = file.slice(start, stop + 1);
readers[readers.length - 1].readAsText(blob, "UTF-8");
}
document.getElementById("list").innerHTML = "";
document.getElementById("prelist").value = encodeURIComponent(document.getElementById("list").innerHTML);
doneonce="y";
}
';
} else if ($inmode == "body") {
return ' onload="doonload();" ' ;
} else {
return ' ... or ... Local Client Files via
';
}
}
$url = "http://" . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . str_replace("?" . $_SERVER['QUERY_STRING'], "", $_SERVER['REQUEST_URI']);
$ptag = ""; //"body";
$ctag = ""; //"form";
$attrib = "";
$start = "<";
$end = "";
$isaspec = "";
if (isset($_GET['url'])) {
if (strpos(urldecode($_GET['url']), "http:") !== false || strpos(urldecode($_GET['url']), "https:") !== false || strpos(urldecode($_GET['url']), "HTTP:") !== false || strpos(urldecode($_GET['url']), "HTTPS:") !== false) {
$url = urldecode($_GET['url']);
} else if (strpos(urldecode($_GET['url']), "file:") !== false || strpos(urldecode($_GET['url']), "FILE:") !== false || strpos(urldecode($_GET['url']), "File:") !== false) {
if (strpos(urldecode($_GET['url']), ",") !== false) {
$url = urldecode($_GET['url']);
$isfs = explode(",", urldecode($_GET['url']));
$isaspec = "";
$mydelim = "";
for ($ji=0; $ji";
$toosimple = " ... made up of ";
if ($url != "" && $ptag != "" && $ctag != "") {
echo '
';
echo 'Find ' . str_replace("<", "<", str_replace(">", ">", $ctag)) . ' Tags Within ' . str_replace("<", "<", str_replace(">", ">", $ptag)) . ' Tags With or Without Attributes ' . str_replace("<", "<", str_replace(">", ">", $attrib)) . ' ' . "\n";
echo 'Report regarding ' . $url . ' ... ' . "\n";
$cont = "";
if ($isaspec != "") { // this is a filespec (list?) rather than one file
$isspec = explode(",", $isaspec);
for ($ki=0; $ki", $bitcont);
if (sizeof($bits) > 1) {
$thenbits = explode("
", $bits[1]);
echo "" . $thenbits[0];
}
}
}
}
} else {
$urls = explode(",", $url);
if (sizeof($urls) > 1) { // list of URLs
$cont = "";
for ($ki=0; $ki", $bitcont);
if (sizeof($bits) > 1) {
$thenbits = explode("", $bits[1]);
echo "" . $thenbits[0];
}
}
}
} else { // usual, original, one URL
$cont = file_get_contents($url);
}
}
if (strlen($cont) > 0) {
$cnt = 0;
$report = "";
$startchar = substr($start, 0, 1);
$endchar = str_replace("<", ">", str_replace("[", "]", str_replace("{", "}", str_replace("(", ")", $startchar))));
if (substr($end, 0, 1) == "/") {
$pseudo_end = str_replace("/", "|", str_replace($endchar, "@", $end));
$sparecont = str_replace($pseudo_end, $end, str_replace($endchar, " ", str_replace($end, $pseudo_end, $cont)));
$epll = $end; // likely is "/>"
$epul = $end;
$ecll = $end;
$ecul = $end;
} else {
$sparecont = str_replace($endchar, " ", $cont);
$epll = $end . strtolower($ptag) . $endchar; // likely is something like ""
$epul = $end . strtoupper($ptag) . $endchar;
$ecll = $end . strtolower($ctag) . $endchar;
$ecul = $end . strtoupper($ctag) . $endchar;
}
$spll = $start . strtolower($ptag) . " "; // likely is something like "Total parent tag " . str_replace("<", "<", str_replace(">", ">", $spll)) . " found is " . (sizeof($huhls) - 1) . " ";
if ($attrib != "" && (sizeof($huhls) - 1) >= 1) {
$rcnt = 0;
$lcnt = strlen($huhls[0]);
$newspare = $huhls[0];
for ($ij=1; $ij strlen($spll) && $nextis !== false) {
$snextis = explode($epll, $huhls[$ij]);
$huhls[$ij] = $snextis[0] . substr("@!#$%@#$!@#$%%%%%%;", 0, strlen($epll)) . substr($huhls[$ij], strlen($snextis[0]) + strlen($epll));
}
}
} else {
$newspare .= substr("@!#$%@#$!@#$%%%%%%;", 0, strlen($spll));
$nextis = strpos($huhls[$ij], $epll);
if (strlen($epll) > strlen($spll) && $nextis !== false) {
$snextis = explode($epll, $huhls[$ij]);
$huhls[$ij] = $snextis[0] . substr("@!#$%@#$!@#$%%%%%%;", 0, strlen($epll)) . substr($huhls[$ij], strlen($snextis[0]) + strlen($epll));
}
}
$lcnt += strlen($huhls[$ij]);
$newspare .= $huhls[$ij];
}
$sparecont = $newspare;
echo " Total relevant (ie. contains " . $attrib . ") parent tag " . str_replace("<", "<", str_replace(">", ">", $spll)) . " found is " . $rcnt . " ";
$huhl = strpos(strtolower($sparecont), $spll);
}
$huhls = explode($scll, strtolower($sparecont));
echo " Total child tag " . str_replace("<", "<", str_replace(">", ">", $scll)) . " found is " . (sizeof($huhls) - 1) . " ";
$found = 0;
if ($huhl !== false) {
$huhls = explode($spll, strtolower($sparecont));
$newspare = "";
$newspare = $huhls[0];
for ($ij=1; $ij" . str_replace("<", "<", str_replace(">", ">", $scll)) . " ... " . str_replace("<", "<", str_replace(">", ">", $nexta[0])) . " ";
$stuff = explode($scll, $nexta[0]);
if (strpos($makeuplist, ";" . (sizeof($stuff) - 1) . ":") !== false) {
$fi = explode(";" . (sizeof($stuff) - 1) . ":", $makeuplist);
$fin = explode(";", $fi[1]);
$makeuplist = str_replace(";" . (sizeof($stuff) - 1) . ":" . $fin[0] . ";", ";" . (sizeof($stuff) - 1) . ":" . ($fin[0] + 1) . ";", $makeuplist);
} else if (strpos($makeuplist, ":") !== false) {
$toosimple = "youll_neverfindthis";
$makeuplist .= (sizeof($stuff) - 1) . ":1;";
} else {
$makeuplist .= (sizeof($stuff) - 1) . ":1;";
}
if ($toosimple != $suffix) {
$suffix = " ... made up of " . str_replace(":", " count is ", str_replace(";", " ... Groups of ", substr($makeuplist,0,(strlen($makeuplist) - 1))));
}
$found += (sizeof($stuff) - 1);
}
}
}
echo " Total child tag " . str_replace("<", "<", str_replace(">", ">", $scll)) . " found within parent tag " . str_replace("<", "<", str_replace(">", ">", $spll)) . " is " . $found . " " . str_replace($toosimple, "", $suffix) . " ";
} else if ($huhu !== false) {
$huhls = explode($spul, strtoupper($sparecont));
echo " Total parent tag " . str_replace("<", "<", str_replace(">", ">", $spll)) . " found is " . (sizeof($huhls) - 1) . " ";
if ($attrib != "" && (sizeof($huhls) - 1) >= 1) {
$rcnt = 0;
$lcnt = strlen($huhls[0]);
$newspare = $huhls[0];
for ($ij=1; $ij strlen($spul) && $nextis !== false) {
$snextis = explode($epul, $huhls[$ij]);
$huhls[$ij] = $snextis[0] . substr("@!#$%@#$!@#$%%%%%%;", 0, strlen($epul)) . substr($huhls[$ij], strlen($snextis[0]) + strlen($epul));
}
}
} else {
$newspare .= substr("@!#$%@#$!@#$%%%%%%;", 0, strlen($spul));
$nextis = strpos($huhls[$ij], $epul);
if (strlen($epul) > strlen($spul) && $nextis !== false) {
$snextis = explode($epul, $huhls[$ij]);
$huhls[$ij] = $snextis[0] . substr("@!#$%@#$!@#$%%%%%%;", 0, strlen($epul)) . substr($huhls[$ij], strlen($snextis[0]) + strlen($epul));
}
}
$lcnt += strlen($huhls[$ij]);
$newspare .= $huhls[$ij];
}
$sparecont = $newspare;
echo " Total relevant (ie. contains " . $attrib . ") parent tag " . str_replace("<", "<", str_replace(">", ">", $spll)) . " found is " . $rcnt . " ";
$huhu = strpos(strtoupper($sparecont), $spul);
}
$huhls = explode($scul, strtoupper($sparecont));
echo " Total child tag " . str_replace("<", "<", str_replace(">", ">", $scll)) . " found is " . (sizeof($huhls) - 1) . " ";
$found = 0;
if ($huhu !== false) {
$huhls = explode($spul, strtoupper($sparecont));
$newspare = "";
$newspare = $huhls[0];
for ($ij=1; $ij" . str_replace("<", "<", str_replace(">", ">", $scul)) . " ... " . str_replace("<", "<", str_replace(">", ">", $nexta[0])) . " ";
$stuff = explode($scul, $nexta[0]);
if (strpos($makeuplist, ";" . (sizeof($stuff) - 1) . ":") !== false) {
$fi = explode(";" . (sizeof($stuff) - 1) . ":", $makeuplist);
$fin = explode(";", $fi[1]);
$makeuplist = str_replace(";" . (sizeof($stuff) - 1) . ":" . $fin[0] . ";", ";" . (sizeof($stuff) - 1) . ":" . ($fin[0] + 1) . ";", $makeuplist);
} else if (strpos($makeuplist, ":") !== false) {
$toosimple = "youll_neverfindthis";
$makeuplist .= (sizeof($stuff) - 1) . ":1;";
} else {
$makeuplist .= (sizeof($stuff) - 1) . ":1;";
}
if ($toosimple != $suffix) {
$suffix = " ... made up of " . str_replace(":", " count is ", str_replace(";", " ... Groups of ", substr($makeuplist,0,(strlen($makeuplist) - 1))));
}
$found += (sizeof($stuff) - 1);
}
}
}
echo " Total child tag " . str_replace("<", "<", str_replace(">", ">", $scll)) . " found within parent tag " . str_replace("<", "<", str_replace(">", ">", $spll)) . " is " . $found . " " . str_replace($toosimple, "", $suffix) . " ";
}
}
echo '
' . "\n";
echo '
' . "\n";
} else {
echo '
';
echo 'Find Tags Within Tags With or Without Attributes URL comma separated allowed Local web server file:// with/without * for filespecs allowed ... eg. file://./*.*ml ' . "\n";
echo '
' . "\n";
}
?>