Embedding Discourse Category not Topic

So we managed to acces a json page when going on the folowing url:

http://forum.culibo.com/c/Femme-Enceinte/l/latest.json


On our side, we use PHP and we use those fonction:

$allTopicsList = file_get_contents(‘https://forum.culibo.com/c/Femme-Enceinte/l/latest.json’);
var_dump($allTopicsList);
And File_get_content is returning NULL.

Reminder: our discourse’s url is: https://forum.culibo.com/
Our website url is: https://dev.culibo.com/planning

Update: we also tryed 2 other methods:

  • First div is the result of (JQUERY) load method.
  • Seconde div is Ajax requested (JS).
  • Third is the result of file_get_content (PHP)

Here is the code :

<div id="iframeLike"></div>
       <div id="iframeLikeII"></div>
       <div id="iframeLikeIII"><?= $allTopicsList ?></div>

       <script>
           $(function()
           {
               $("#iframeLike").load("<?= $forumURL ?>");

               $.ajax({
                   url: "<?= $forumURL ?>", // target
                   type: "GET", // HTTP request type
                   cache: false, // clearing the cache
                   dataType: "json", // type of the data to send
                   success: function(retrievedJsonData, statut) {
                       console.log(retrievedJsonData);
                       $("#iframeLikeII").text(retrievedJsonData);
                   },
                   error: function(resultat, statut, erreur) {
                       console.log(resultat);
                   }
               });
           });
       </script>

None of the 3 ways gives an answer, and here is the console message we have:

It means Multiorigines request had been bloqued ( Cross origin request ) The policy do not allow to consult the distant ressources on (https://URL.com) reason is CORS request failed