Im using DomDoc to pull a page but because my server is in the US it pulls the US page and not the UK page.
Is there away to trick it into pulling the UK based page??
<?php
//above will be pulingthe race data
$pagecode = "1.119512711";
$url = "http://form.timeform.betfair.com/racecard?id=".$pagecode; //WILL NEED TO PULL TOMORROWS DATE AS DD-MM-YYY
echo $html = file_get_contents($url);
$dom = new DOMDocument();
@$dom->loadHTML($html);
$dom->preserveWhiteSpace = false;
$xpath = new DOMXPath($dom);
//pull the individual cards for the day
//li class="rac-cardsclass="ix ixc"
$getdropdown = '//ul[contains(@class, "runner-body-container")]/li/div/ul';
$getdropdown2 = $xpath->query($getdropdown);
//loop through each individual card
foreach ($getdropdown2 as $dropresults) {
$repl = preg_replace('/\h*[^ a-zA-Z].*$/m', '', trim($dropresults->childNodes->item(8)->textContent))."<br />";
$dropresults->childNodes->item(18)->textContent."<br />";
$dropresults->childNodes->item(20)->textContent."<br />";
}
?>