<?php
$request = 'https://getbible.net/json?p=James3:5';
$response = file_get_contents($request);
$info = array_shift(json_decode($response));
echo($info->verse ." ");
?>
PHP Warning: file_get_contents(https://getbible.net/json?p=James3:5): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
$opts = [
'http'=> [
'user_agent' => 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0',
]
];
$context = stream_context_create($opts);
ini_set('user_agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20100101 Firefox/9.0');
PHP Warning: file_get_contents(https://getbible.net/json?p=James3:5): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden