Documentation

Here you can find sample code to implement our API.


<?php
//API URL
$url="You can find http API url from http://indianrailapi.com/IndianRail/API";
// init the resource
$ch = curl_init();//Ignore SSL certificate verification
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
//get response
$output = curl_exec($ch);
//Print error if any
if(curl_errno($ch))
{
    echo 'error:' . curl_error($ch);
}
curl_close($ch);
echo $output;
?>
Contributed By : Gurprit Kaur
Note: If you are too beginner in development, you can use our services in Rs. 500.(Only for paid users.) (C#.Net, VB.Net, JQuery, AngularJS Only.)
Developers are requested to contact at admin@indianrailapi.com with sample code to become support members. Sample code must be uploaded in github, google drive and so on.