$url = 'http://sfs.dev.pankaj.happlabs.in/api/v1/init';
If file name init doesn't exist and whole url is correct how to check that in php.
$url = 'http://sfs.dev.pankaj.happlabs.in/api/v1/init';
If file name init doesn't exist and whole url is correct how to check that in php.
The JSON at http://sfs.dev.pankaj.happlabs.in/api/v1/init is invalid, so you will get errors. The endpoint appears to be correct though.
To check in PHP however (to answer your question), you can use :
http://php.net/manual/en/function.file-get-contents.php
<?php
if ($html = file_get_contents('http://cia.gov')) {
// $html has content
}