Hello guys
this is my code
// build query string
$searchUrl = "http://www.dezrez.com/DRApp/Search.ASP?WCI=Results&GType="
. $_POST["GType"] . "&EAID=" . $_POST["EAID"]
. "&perpage=" . $_POST["perpage"] . "&StyleSheet="
. $_POST["StyleSheet"] . "&xslt=" . $_POST["xslt"]
. "&priceOrder=" . $_POST["priceOrder"] . "&ShowSTC="
. $_POST["ShowSTC"] . "&MinPrice=" . $_POST["MinPrice"]
. "&MaxPrice=" . $_POST["MaxPrice"] . "&bid="
. $_POST["bid"] . "&Bedrooms=" . $_POST["Bedrooms"]
. "&rentalperiod=" . $_POST["rentalperiod"]
. "&Glazing_type" . $_POST["Glazing_type"];
// Fetch the remote URL and store it to disk
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $searchUrl);
$fp = fopen('searchResult.xml', 'w');
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fclose($fp);
// read fetched XML from local file
$xmlDoc = new DOMDocument();
$xmlDoc->load('searchResult.xml');
$properties = $xmlDoc->getElementsByTagName("property");
foreach ($properties as $property) {
$description = $property->getElementsByTagName("description");
}
I want to open above link("searchUrl") internally and then want to read every node of xml file getting from this searchUrl so that i cant put that information in proper format. If you want to know more about this please go to This link, hope you will understand everything what i want to do ..
Note: this is a follow-up to saving and reading a xml file getting from the other url