file get contents - Odd php file_get_contents behavior -


I wrote a file in PHP which is doing some screen work and a simple number based on the location GET parameter In this case, the output is 49, see for yourself, cut it into your browser and paste it:

When I drag it into another php file, which I To calculate something with the numbers I want to use, this returns, in vain, a different number (this case 7174, as you can see that you have reached the following URL):

This is the source of Test.php - note that the $ url is the same as the above location parameter (This is a cut and paste):

  $ url = "http: //www.ericseven com / distance.php? Location = 3133 W. Belle Avenue San Tan Valley, AZ 85142 "; $ Contents = file_get_contents ($ url); $ Content echo;   

I searched and searched and I do not know whether I am searching for wrong or what the deal is, but I can not get any relationship between two numbers (49 and 7174) is. Nor can I meet anyone who is doing something similar in the way. FII I tried FOPN / Friede - the same result.

Try

  $ Url = "http: // www .ericseven.com / distance.php? Location = ". Urlencode (" 3133 W. Belle Avenue San Tan Valley, AJ 85142 ");    

Comments