PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of NaiFPHP   Get tag value   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: pagehome for example
Class: Get tag value
Extract HTML contained in tags from a Web page
Author: By
Last change:
Date: 16 years ago
Size: 2,282 bytes
 

Contents

Class file image Download
<?php

/***************************************************************************
============================================================================
| @ Script Name : Get Tag Value
| @ Version : 1.0
| @ Description : Get The Tag Value .
| @ All rights reserved to : NaiF PHP
| @ Created In : 09-07-2007
| @ Support : wald_al_dala@hotmail.com
============================================================================
****************************************************************************/

echo (" <html dir=\"ltr\">\n<title> Get Tag Value </title> ");


include
"GTV.class.php";

//======================================
// Note :
// write Start Tag like this : <tag>
// = = = = = : <\/tag>
// example (1) :
//======================================

$ob = new GTV(
             
"test.php",
              array(
"<title>","<h3>","<font color=\"red\">"),
              array(
"<\/title>","<\/h3>","<\/font>")
              );

echo
"<pre>";
print_r ($ob->tag_value);

//======================================
// example (2) :
//======================================

echo "<br><hr><br>";


$ob = new GTV(
             
"test.php",
             
"<head>",
             
"<\/head>"
             
);

echo
"<pre>";
print_r ($ob->tag_value);



//======================================
// example (3) :
//======================================

echo "<br><hr><br>";;


$ob = new GTV(
             
"test.php",
             
"<title>",
             
"<\/title>"
             
);

echo
"<pre>";
echo
$ob->tag_value;


//======================================
// your can using this class to do : Ex 4
// example (4) :
//======================================

echo "<br><hr><br>";;


$ob = new GTV(
             
$_SERVER['HTTP_REFERER'],
             
"<title>",
             
"<\/title>"
             
);

echo
"<pre>";
$title_reff = $ob->tag_value;
// remove _tag_
$Title = explode("::",$title_reff);

echo
" Your come from site : <a href=\"".$_SERVER['HTTP_REFERER']."\">",$Title[1] ,"</a>";

echo
"</pre>";
// End Example


echo "<br><br><br>",highlight_file(__FILE__,true);

?>