Location: PHPKode > projects > SMS Web Sender > sms_web_sender/test/test_HTML_Functions.php
<?php
error_reporting (E_ALL);
echo '<pre>';

// include classes
define('HTTPNAV_ROOT', realpath('../../http_navigator/classes/').'/');
require_once(HTTPNAV_ROOT.'HTML_Parser.php');
require_once('../classes/HTML_Functions.php');


$html = implode('', file('test_html.html'));
$hf =& new HTML_Functions();

// get link URL
echo 'URL of "a link": ', $hf->get_link_url($html, 'a link'), "\n";

// get string after
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
echo 'Input name for index 3: ', $hf->get_input_name_by_index($html, 3), "\n";

// get form action by index
echo 'Form action of form 2: ', $hf->get_form_action_by_index($html, 2), "\n";

// get input value by index
echo 'Input value of index 6: ', $hf->get_input_value_by_index($html, 6), "\n";

// get input type by index
echo 'Input type of index 4: ', $hf->get_input_type_by_index($html, 4), "\n";

// get input name and value by index
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";


Return current item: SMS Web Sender