# Incorporazione della categoria di discorso, non dell'argomento

**URL:** <https://meta.discourse.org/t/embedding-discourse-category-not-topic/83615>\
**Category:** Feature\
**Created:** [23 Marzo 2018, 2:17am UTC](https://meta.discourse.org/t/embedding-discourse-category-not-topic/83615 "2018-03-23T02:17:46Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![TeoWneD](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@TeoWneD](https://meta.discourse.org/u/TeoWneD)\
**Post date:** [3 Ottobre 2018, 2:26pm UTC](https://meta.discourse.org/t/embedding-discourse-category-not-topic/83615/13 "2018-10-03T14:26:00Z")

</div>

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

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

 ![321654987](https://global.discourse-cdn.com/meta/original/3X/7/e/7e66407c559a7827f33b7203e060da1fe08cdeb8.jpeg)  
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](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/](https://forum.culibo.com/)  
Our website url is: [https://dev.culibo.com/planning](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:

 ![consoleMessage](https://global.discourse-cdn.com/meta/original/3X/c/5/c507f76eeb5b4c65cb6cf6a4ae8f3b94da11e690.jpeg)

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

---

_[View the full topic](https://meta.discourse.org/t/embedding-discourse-category-not-topic/83615)._
