Skip to content

Commit

Permalink
Fixing issue with marquee not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltan-dulac committed Jan 28, 2025
1 parent a95194d commit 84694c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions services/getHeadlines.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

header("Content-Type: application/json; charset=utf-8");

$response = json_cached_api_results(); //file_get_contents("https://newsapi.org/v2/top-headlines?country=ca&apiKey=d25934a07be84a96a22d882d5d91075b");
$response = json_cached_api_results(); //file_get_contents("http://newsapi.org/v2/top-headlines?country=us&apiKey=d25934a07be84a96a22d882d5d91075b");
echo $response;


/**
* API Request Caching
*
Expand Down Expand Up @@ -33,7 +34,7 @@ function json_cached_api_results($cache_file = null, $expires = null)
) {
// File is too old, refresh cache
$api_results = file_get_contents(
"https://newsapi.org/v2/top-headlines?country=ca&apiKey=d25934a07be84a96a22d882d5d91075b",
"http://newsapi.org/v2/top-headlines?country=us&apiKey=d25934a07be84a96a22d882d5d91075b",
);
$json_results = json_encode($api_results);

Expand Down

0 comments on commit 84694c6

Please sign in to comment.