<?php
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://api.google.com/v1/jobsearch?&DeveloperKey=WDH38FQ65G6P0DTBZ09C&Keywords=php&PageNumber=1");
curl_setopt ($curl,CURLOPT_RETURNTRANSFER,1);
$data = curl_exec ($curl);
$curl = curl_init();
curl_setopt ($curl, CURLOPT_URL, "http://api.google.com/v1/jobsearch?&DeveloperKey=WDH38FQ65G6P0DTBZ09C&Keywords=php&PageNumber=1");
curl_setopt ($curl,CURLOPT_RETURNTRANSFER,1);
$data = curl_exec ($curl);
$arrData = simplexml_load_string($data);
/*echo "
/*echo "
"; print_r($arrData);*/ echo "
Total Result : ".$arrData->TotalCount."
";
echo "
echo "
Total Pages : ".$arrData->TotalPages."
";
echo "
echo "
Limit Start : ".$arrData->FirstItemIndex."
";
echo "
echo "
Limit End : ".$arrData->LastItemIndex."
";
echo "
";
echo "
echo "
";
echo "
"; echo "";echo "";
echo "Description";
echo "Date";
echo "";
foreach($arrData->Results->JobSearchResult as $key=>$obj)
{/*$arrvalues[] = array(
'location'=>$obj->Location,
'company_name'=>$obj->Company,
'description'=>$obj->DescriptionTeaser,
'date_added'=>$obj->PostedDate
);*/
$arrvalues[] = array(
'title'=>(string)$obj->JobTitle,
'location'=>(string)$obj->Location,
'company_name'=>(string)$obj->Company,
'description'=>(string)$obj->DescriptionTeaser,
'date_added'=>(string)$obj->PostedDate
);
echo "
";echo "".$obj->Location."";
echo "".$obj->DescriptionTeaser."";
echo "".$obj->PostedDate."";
echo "";
}
/*echo "";
print_r($arrvalues);*/
echo "
echo "Description";
echo "Date";
echo "";
foreach($arrData->Results->JobSearchResult as $key=>$obj)
{/*$arrvalues[] = array(
'location'=>$obj->Location,
'company_name'=>$obj->Company,
'description'=>$obj->DescriptionTeaser,
'date_added'=>$obj->PostedDate
);*/
$arrvalues[] = array(
'title'=>(string)$obj->JobTitle,
'location'=>(string)$obj->Location,
'company_name'=>(string)$obj->Company,
'description'=>(string)$obj->DescriptionTeaser,
'date_added'=>(string)$obj->PostedDate
);
echo "
";echo "".$obj->Location."";
echo "".$obj->DescriptionTeaser."";
echo "".$obj->PostedDate."";
echo "";
}
/*echo "";
print_r($arrvalues);*/
echo "
Location |
---|
";
curl_close ($curl);
?>
curl_close ($curl);
?>
No comments:
Post a Comment
Please mention your comments.......