Upload data New File

parent 1afa96a1
<?php
function getData() {
// return "Done";
try{
$q = $_GET['q'];
$api_url = 'https://api.wolframalpha.com/v1/result?appid=26Q368-9Q9ERTXHP6&i='.$q;
// $api_url = 'http://api.wolframalpha.com/v1/result?appid=26Q368-9Q9ERTXHP6&i=How+far+is+Los+Angeles+from+New+York';
$response = file_get_contents(str_replace(" ", "+", $api_url));
return $response;
}catch(Exception $e){
return $e->getMessage();
}
}
echo getData()
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment