i am trying to get data from a website https://api.timescoaching.in/v1/courses
but my php code is not return anything.And when i open this url https://api.timescoaching.in/v1/courses
in browser it working fine. I am sharing my php code please correct if there is any mistake
<?php
$homepage = file_get_contents('https://api.timescoaching.in/v1/courses');
echo $homepage;
?>
If the site is hosted on a server and you have access to the php.ini file then change the value of allow_url_fopen = On; .Your error will be fixed, this error generates when the default value of allow_url_fopen is set to zero which does not allow any data interaction or url interaction with other urls.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.