Help with ajax call?

0 favourites
  • 3 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi

    I made a game that get a set of question from a web service, and I will export it to andrid with cocoonjs.

    but when i try to get the questions, it shows me an acces cros domain error.

    is there a way to solve this problem from the client side?

    its because I have no acces to the server administrator.

  • Sorry but no...

    You need to modify the header response server side.

    <?php

    //Allows all AJAX requests from any domain

    header('Access-Control-Allow-Origin: *');

    ?>

    CAUTION!

    If you add this it will allow all requests from any domain that this website is not hosted on. I would recommend you do more reading on this before using it. But if you don't have access to the server then its kinda moot any way.

    Curious though your sending an Ajax request to a server you don't even have access to?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thanks troublesum.

    yes I am sending an Ajax request to a server that I don't have access to :S

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)