How to convert curl data to javascript?
<p>i am sending my request to corss domain to get the xml data ,here i am making curl request to get the data from diferent domain . i am getting the data but i want to use that data using javascript .Below is my curl code it's in seprate file. call -> <strong>air.php</strong></p>

<pre><code>&lt;?php
$url = "http://xmlfltdata.ifids.com/ifids/EDIAirportXMLData.asp?apt=YKF&amp;pwd=mk37";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$getData = curl_exec($curl);
</code></pre>

<p>so if i do var_dump($getData) i am getting request back.
Now i have anothr file call :<strong>airport.php</strong></p>

<pre><code>&lt;h1&gt;Flight Details&lt;/h1&gt;
&lt;span style="font-size: 18px;color: #61966C"&gt;
&lt;p id='showFlight'&gt;&lt;/p&gt;
&lt;/span&gt;
&lt;table id="flightInfo"&gt;&lt;/table&gt;
&lt;script&gt;

    var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");


    xmlhttp.open("get","air.php",true);
    xmlhttp.send(null);

    var xmlDoc = xmlhttp.responseXML;   

    var FlightData = xmlDoc.getElementsByTagName("Header");

    table="&lt;tr&gt;&lt;th&gt;FlightNumber&lt;/th&gt;&lt;th&gt;Arrival || Departure&lt;/th&gt;&lt;/tr&gt;";

    for (i = 0; i &lt; FlightData.length; i++)
    {  //do somethign here
     }
</code></pre>

<p>Now i am not able to make the Ajax request to get the data from my curl file .How can i make request to get that data in javascript.
Please Help</p>