Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by buxton4life · May 09, 2012 at 01:42 PM · wwwphp

Php not downloading data for game on web player

I have built a game that includes some php calls to retrieve leader boards scores etc. This works fine online when on my localhost...I then duplicated the site and game and published on the web.

I then published this game on the real site yet the php fails to work under the error found in the console --

 Failed downloading http://localhost:8888/resources/check_scores.php 

I have changed the ProjectSettings/editor, WWW security emulation settings to the current website example www.example.co.uk/project, crossdomain.xml is also uploaded. I have also changed the javascript for example -

Original:

 $url = "http://http://localhost:8888/GravBallWebsite/update_level_score.php"

New:

 $url = "http://www.gravball.co.uk/update_level_score.php"

Yet the game somehow still calls the original URL localhost!

Is there something i'm missing or something I need to change on the website security settings/code for the game to download from the new website and not the original host.

I'm guessing it's something really simple as I know what the error is.

The game works fine online when I turn on my localhost and when local host is turned off it doesn't work so the game is somehow still relying on local host??? Even though I have changed the javascript/php to the new website's url. Any help would be very much appreciated!

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Graham-Dunnett ♦♦ · May 09, 2012 at 03:15 PM 1
Share

You've presumably got some game script code that called into the WWW class. In your post you have $url shown, which I assume is a PHP variable. That tells me that you game code must ask some PHP code what the URL is for the update_level_score script. You'll probably want to debug the code that gets this URL. The only thing I can think of at the moment is that the web player uses the web browser when you call WWW, so the browser might be getting a cached version. Try blowing away your browser cache and try again.

avatar image buxton4life · May 09, 2012 at 05:43 PM 0
Share

Graham what I did was set the new variable to URL2 and it now works online!! Thanks for your help.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by tw1st3d · May 11, 2012 at 01:07 AM

What you can also do is this.

 $url = "http://http://localhost:8888/GravBallWebsite/update_level_score.php";
 $url .= "http://www.gravball.co.uk/update_level_score.php";
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to debug php code when use www to communicate with server side. 0 Answers

WWW class and PHP security issues 1 Answer

WWW.texture provides a :"?" texture... 1 Answer

Upload audio file into mysql database 0 Answers

Using POST/GET from JavaScript in Webplayer to .php file; How do I set up the data in the php file that is to be transfered? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges