Click here to Skip to main content
15,883,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
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
<?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/');
}
?>
Posted
Comments
Killzone DeathMan 30-Jun-14 12:51pm    
Its in JSON format..
$array = json_decode($resultarray);
print_r($array);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900