Last active
December 20, 2015 02:59
-
-
Save shahariaazam/6059910 to your computer and use it in GitHub Desktop.
Wizpert help for Sridhar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$curl = curl_init(); | |
$url = "http://search.asu.com/admintool/listingsTest_ASU.php"; | |
//$url ="http://search.asu.com/_data/airports.php"; | |
curl_setopt($curl, CURLOPT_URL, $url); | |
curl_setopt($curl, CURLOPT_POSTFIELDS,null); | |
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); // follow redirects | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
$data = curl_exec($curl); | |
curl_close($curl); | |
$data = utf8_decode($data); | |
$string = str_replace(" ", '', $data); | |
$newData = str_replace(""", '*', htmlentities($string)); | |
//$newData = str_replace(""", '*', htmlentities($string)); | |
//$newData = explode('*', $newData); | |
//$withoutEmptyValue = array_filter($newData, 'strlen'); | |
$newDataT = explode('*', $newData); | |
var_dump($newDataT); die(); | |
foreach($withoutEmptyValue as $val) | |
{ | |
$description = trim($val["description"]); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment