Dave3765 Posted November 6, 2007 Share Posted November 6, 2007 Hey Guys, I need to read a single number that is generated from a mysql database query on another domain. My host won't allow connecting directly to other sql's on different domains, so I am trying to use readfile and the following code to achieve the same thing: $prodcount = readfile('http://www.myothersite.com/script-that-generates-the-number.php'); echo $prodcount; The problem is that whenever I echo $prodcount it has a checksum/hash (not sure exactly what to call it) at the end of my number. Is there anyway i can remove this without editing my php.ini, or can you think of a better way of getting this number from my other site? Thanks - this has been confusing me for a while. ??? Quote Link to comment https://forums.phpfreaks.com/topic/76199-solved-checksums-how-do-i-eliminate-them-or-at-least-hide-them/ Share on other sites More sharing options...
MadTechie Posted November 6, 2007 Share Posted November 6, 2007 can you post an example you could probably trim it via substr or regex Quote Link to comment https://forums.phpfreaks.com/topic/76199-solved-checksums-how-do-i-eliminate-them-or-at-least-hide-them/#findComment-385631 Share on other sites More sharing options...
bache Posted November 6, 2007 Share Posted November 6, 2007 Use file_get_contents() instead of readfile() Quote Link to comment https://forums.phpfreaks.com/topic/76199-solved-checksums-how-do-i-eliminate-them-or-at-least-hide-them/#findComment-385650 Share on other sites More sharing options...
Dave3765 Posted November 6, 2007 Author Share Posted November 6, 2007 I tried to use substr to trim it off, but it didn't have any effect on the chucksum. I just tried file_get_contents and it works perfectly - thanks Quote Link to comment https://forums.phpfreaks.com/topic/76199-solved-checksums-how-do-i-eliminate-them-or-at-least-hide-them/#findComment-385672 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.