I'm trying to get the response json from this api call. For doing this I build the url in the following way:
$currentDate = date("Y-m-d");
$timestamp = date("Y-m-d H:m:s");
$url = "https://int.soccerway.com/a/block_home_matches?block_id=block_home_matches_30&callback_params=";
$url .= "{\"block_service_id\":\"home_index_block_homematches\",\"date\":\"". $currentDate ."\",";
$url .= "\"display\":\"now_playing\",\"timestamp\":\"". $timestamp . "\"}";
$url .= "&action=filterContent¶ms=";
$url .= "{\"display\":\"now_playing\"}";
so I executed the request:
$html = file_get_contents($url);
$json = json_decode($html);
I get:
failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
but the link is correct, infact if you paste the $url you can see the correct response.
What I did wrong?