I need to get the json data from, http://vortaro.us.to/ajax/epo/eng/ + \'word\'+ \"/?callback=?\" working example (not enough reputation)
I know how to do it in jav
Old question, but still one of the top hits in Google, so here is my contribution on top of @DrDol's answer.
$url = "http://www.example.com/api/v1/endpoint";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = json_decode(curl_exec($ch));
curl_close($ch);
?>
Note the user of the CURLOPT_RETURNTRANSFER which sends the response into the return value (and returns false on fail).