1504224000000
Heroku
by Start Bootstrap
Once i was assigned to do an interesting task. (Web scrapping - for testing purpose)
I have done a much play in manual javascript html parsing technique, and then finally came up with php
Here's the part
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET');
if($_GET){
if($_GET['code']==''){
$error ="Code should not be empty";
echo $error;
}
else{
$url = "https://pilotweb.nas.faa.gov/PilotWeb/notamRetrievalByICAOAction.do?method=displayByICAOs&reportType=RAW&formatType=ICAO&retrieveLocId=".$_GET['code']."&actionType=notamRetrievalByICAOs";
$data = file_get_contents($url);
echo $data;
}
}
else{
$error ="Invalid Access";
//echo $error;
}
?>
Also,
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET');
$url = "https://pilotweb.nas.faa.gov/PilotWeb/notamRetrievalByICAOAction.do?method=displayByICAOs&reportType=RAW&formatType=ICAO&retrieveLocId=VOMM&actionType=notamRetrievalByICAOs";
$data = file_get_contents($url);
echo $data;
?>
And the javascript part is missing, as i didn't saved it in good way,
btw, here's the heroku app
notams.herokuapp.com