samjsharples Posted July 6, 2014 Share Posted July 6, 2014 Hi. I am trying to fetch xml from a betting website feed. The feed is restricted per IP but I have had the server IP, where the site is located, whitelisted and they have confirmed numerous times that the IP has definitely been whitelisted. If I try to connect using simplexml_load_file to a BBC xml feed it works fine but to the betting feed I get "failed to open stream: HTTP request failed!" Is there any way of knowing why it is failing or is there anything else that could prevent it from connecting to that specific feed? many thanks in advance Sam Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/ Share on other sites More sharing options...
requinix Posted July 6, 2014 Share Posted July 6, 2014 What happens if you try to use file_get_contents() or cURL to retrieve the XML? Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/#findComment-1484054 Share on other sites More sharing options...
samjsharples Posted July 7, 2014 Author Share Posted July 7, 2014 exactly the same :-( Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/#findComment-1484194 Share on other sites More sharing options...
requinix Posted July 8, 2014 Share Posted July 8, 2014 Actually I was hoping for more error messages, but okay. cURL could give you exact HTTP error codes and the response, if any, which may help. Sounds like it's still blocked. They should have access logs showing the failed connections... Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/#findComment-1484203 Share on other sites More sharing options...
samjsharples Posted July 8, 2014 Author Share Posted July 8, 2014 Ok, another strange thing now. I have had another betting company ask for the IP to be whitelisted and that one isn't working either!! I'm sure i'm asking for the correct IP but could it be the fact that it is a shared hosting box? What else could be preventing this from working? I had my own dedicated server whitelisted and that one works, it's just this clients one that isnt working... Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/#findComment-1484243 Share on other sites More sharing options...
samjsharples Posted July 8, 2014 Author Share Posted July 8, 2014 the domain is supersoccersite.com. Could somebody please confirm what IP I should be requesting to be whitelisted. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/#findComment-1484250 Share on other sites More sharing options...
requinix Posted July 8, 2014 Share Posted July 8, 2014 I'm seeing 192.254.189.64 but that could vary if you're using DNS-based load balancing. Quote Link to comment https://forums.phpfreaks.com/topic/289490-simplexml_load_file-not-working/#findComment-1484294 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.