here's my shortcode:
[willhill_text_link xmlurl="http://cachepricefeeds.williamhill.com/openbet_cdn?action=template&template=getHierarchyByMarketType&classId=313&marketSort=--&filterBIR=N"]
here's my function:
function willhill_text($atts) {
extract(shortcode_atts(array(
'xmlurl' => '',
), $atts));
$rss = simplexml_load_file($xmlurl);
print_r($rss);
}
add_shortcode('willhill_text_link', 'willhill_text');
If you run it, you will see an xml feed outputted. But, if you simply do this:
$rss = simplexml_load_file('http://cachepricefeeds.williamhill.com/openbet_cdn?action=template&template=getHierarchyByMarketType&classId=313&marketSort=--&filterBIR=N');
print_r($rss);
You get a different output.
It is as if the function is ignoring everything from '?action' onwards from the url being passed.
Can anybody explain why?
Thanks