I use following code for get json encoded result
$.get('localhost/hospital/index/json', function(data) {
alert(data);
});
It is work for localhost URL. But I want get result from external server. I try following example url to do it.
$.get('hospitalsystem.dev/index/json', function(data) {
alert(data);
});
But it is not working. Please help me.