Skip to content

Instantly share code, notes, and snippets.

@shahariaazam
Last active December 20, 2015 02:59
Show Gist options
  • Save shahariaazam/6059910 to your computer and use it in GitHub Desktop.
Save shahariaazam/6059910 to your computer and use it in GitHub Desktop.
Wizpert help for Sridhar
<?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("&quot;", '*', htmlentities($string));
//$newData = str_replace("&quot;", '*', 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