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!

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";