http://www.timenspacemedia.com/carP/ put the copy the vehicle number and paste it into the text box and submit it... it will show all the data on 1 array index... we need all the attributes in the different indexes of the array like this array[0]= car registartion number array[1] = Engine Number
<?php error_reporting(0); if (isset($_POST['dname'])) { $dname = $_POST['dname']; $url='http://mtmis.punjab.gov.pk/Tax%20Collection/searchNameTemp.jsp?names='.$dname; $homepage = file_get_contents($url); $dom = new DomDocument(); $dom->loadHTML($homepage); $xpath = new DOMXpath($dom); $mystring=""; $elements = $xpath->query(".//*[@id='Table_01']"); if (!is_null($elements)) { $resultarray=array(); foreach ($elements as $element) { $nodes = $element->childNodes; foreach ($nodes as $node) { $resultarray[] = $node->nodeValue; $mystring .= $node->nodeValue; } } } print_r($resultarray); } else { header('Location: http://www.timenspacemedia.com/carP/'); } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)