test_HTML_Functions - <?php error_reporting (E_ALL); e...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: <?php error_reporting (E_ALL); e echo '<pre>'; // include classes define('HTTPNAV_ROOT', realpath('../../http_navigator/classes/').'/'); require_once(HTTPNAV_ROOT.'HTML_Parser.php'); r require_once('../classes/HTML_Functions.php'); $html = implode('', file('test_html.html')); $ $hf =& new HTML_Functions(); // get link URL e echo 'URL of "a link": ', $hf->get_link_url($html, 'a link'), "\n"; // get string after e echo 'String after "xmlns=": ', $hf->get_string_after($html, 'xmlns='), "\n"; // get input value by name echo 'Input value for "surname": ', $hf->get_input_value_by_name($html, 'surname'), "\n"; // get input name by index e echo 'Input name for index 3: ', $hf->get_input_name_by_index($html, 3), "\n"; // get form action by index e echo 'Form action of form 2: ', $hf->get_form_action_by_index($html, 2), "\n"; // get input value by index e echo 'Input value of index 6: ', $hf->get_input_value_by_index($html, 6), "\n"; // get input type by index e echo 'Input type of index 4: ', $hf->get_input_type_by_index($html, 4), "\n"; // get input name and value by index e echo 'Input name=value of index 2: ', $hf->get_input_name_value($html, 2), "\n"; // get input name and value by index and form index echo 'Input name=value of index 2 of form 2: ', $hf->get_input_name_value($html, 2, 2), "\n"; ...
View Full Document

This note was uploaded on 01/31/2011 for the course CS 302 taught by Professor J.parker during the Spring '08 term at University of Texas at Austin.

Ask a homework question - tutors are online