Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6137237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:42:02+00:00 2026-05-23T17:42:02+00:00

For a game-related project. To access game data, the user has to authorize access.

  • 0

For a game-related project.

To access game data, the user has to “authorize” access. To do this, they visit a page on the site, which sets 3 cookies on the user’s PC.

When the user then views certain XML URLs, the game server checks these cookies are correct, and returns the information required.

My question is, how do I parse these XML files using the user’s cookies, to add styling to the data etc?

If I use cURL to load the URLs, and CURLOPT_COOKIE to pre-determine the relevant cookies, it returns the information correctly.

However, I will not know the user’s cookies, as they are only valid for the game’s domain.

I’m certain this is possible, although perhaps not through this method, as it has been done before using the same data.

The cookies set are:

toolbar_code = 19 digit auth code
toolbar_hash = 19 digit hashed username
toolbar_remember = true
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:42:02+00:00Added an answer on May 23, 2026 at 5:42 pm

    You can’t read XML cross-domain (without CORS anyway and that’s not mature enough yet).

    The simplest way to have a remote script that checks cookies and returns data to a caller site is to point a <script> to the remote site and have JavaScript execute in that, that gives the caller data. The normal way to do this is JSONP.

    Client-side:

    <script type="text/javascript">
        function receiveData() {
            ...do something...
        }
    </script>
    <script type="text/javascript" src="http://gamedataserver/getdata.php?jsonp=receiveData"></script>
    

    Server-side:

    <?php
        header('Content-Type: text/javascript');
        header('Cache-Control: no-cache');
        if (...user auth is OK...) {
            $callbackfn= preg_replace('/[^a-z_]/', '', $_GET['jsonp']);
            $json= json_encode(...game data...);
            echo "$callbackfn($json);";
        }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to delete all data related to a user id from a game
I'm working on Facebook Canvas Game project together with iPhone Native Game App which
I know this is game design related, but I have read the StackOverflow FAQ
I am porting PC game to iPad which has ton of graphic assets (over
A game that I play stores all of its data in a .DAT file.
In my Flash project I have a movieclip that has 2 keyframes. Both frames
I am doing some game-related rendering with Silverlight, and when I attach a pixel
My project contains a lot of classes, a bunch of which can be described
I'm making a game link site, where users can post links to their favorite
I'm trying to debug some touchesBegan/Moved/Ended related slowdown in my game; I think that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.