get-over-under-odds

[insert_php] global $wpdb, $current_user, $searcher;
require_once($_SERVER[‘DOCUMENT_ROOT’].’/wp-content/themes/enlightenment-child/helper_search.php’);
require_once($_SERVER[‘DOCUMENT_ROOT’].’/wp-content/themes/enlightenment-child/checkuser.php’);
$searcher = new search_helper;
require_once($_SERVER[‘DOCUMENT_ROOT’].’/wp-content/themes/enlightenment-child/wordpress-helper.php’);
$wphelper = new wordpress_helper;

$xxx = “delete from jos_odds where 1=1 ” ;
$wpdb->query($xxx);

$fixtures = 0;
$aa[1] = “http://www.paddypower.com/football/football-matches/over-under-goals-coupon”;

$old_home_team =’abscdssss’;

$date_counter = 0;
$this_counter =0;
foreach ($aa as $url)
{

echo ‘ Processing ‘.$url.’
‘;
$string = file_get_contents($url);
$strlength = strlen($string);

$xx = 0;
$starter = 0;
$price1 = ”;
$price2 = ”;

while ($xx < $strlength) { if (substr($string,$xx,26) == '

‘)
{
$rstring = trim(substr($string,$xx+26,500));
$rstring = substr($rstring,0,strpos($rstring, ‘<')); } if (substr($string,$xx,34) == '
‘)
{
$vstring = trim(substr($string,$xx+34,500));
$vstring = substr($vstring,0,strpos($vstring, ‘;’)-5);

}

if (substr($string,$xx,24) == ‘‘ && $price1 ==”)
{
$price1 = trim(substr($string,$xx+24,500));
$price1 = substr($price1,0,strpos($price1, ‘<')); } else if (substr($string,$xx,24) == '‘ )
{

$price2 = trim(substr($string,$xx+24,500));
$price2 = substr($price2,0,strpos($price2, ‘<')); // echo '
‘.$rstring. ‘ ‘.$vstring . ‘ .vrs. ‘.$bstring.’ ‘.$price1.
// ‘ ‘.$price2.’
‘;

if ($price1 ==’evens’) $price1 =’1/1′;
if ($price2 ==’evens’) $price2 =’1/1′;

// echo ‘rstring is ggg’.date(‘y/m/d’, strtotime($rstring)).’eee
‘;

$vstring = sortteam($vstring);
$bstring = sortteam($bstring);
$query = “insert into jos_odds values (0,'”.date(‘y/m/d’, strtotime($rstring)).
“‘,'”. $vstring.”‘,'”.$bstring .”‘,” .$price1.”,”.$price2.”)”;
$wpdb->query($query);

$query = “update jos_fixtures set under25odds =”. $price1.”, over25odds =”.$price2 .” where h_team ='”.$vstring.”‘ and a_team = ‘”.$bstring.”‘”;
if ($wpdb->query($query) === FALSE)
echo ”;
else
echo ‘

‘. date(‘y/m/d’, strtotime($rstring)).’ ‘.$query;

$price1=”;
$price2 =”;
}

if (substr($string,$xx,41) == ‘

 ‘)
{
$bstring = trim(substr($string,$xx+41,500));
$bstring = substr($bstring,0,strpos($bstring, ‘<')); } ++$xx; } } /* } unset($hteam,$ateam,$league); ++$this_counter; */ function sortteam($team) { if ($team == 'Man Utd') $team = 'Man United'; if ($team == 'Manchester United') $team = 'Man United'; if ($team == 'Hull City') $team = 'Hull'; if ($team == 'A Villa') $team = 'Aston Villa'; if ($team == 'C Palace') $team = 'Crystal Palace'; if ($team == 'Stoke City') $team = 'Stoke'; if ($team == 'Queens Park Rangers') $team = 'QPR'; if ($team == 'West Ham United') $team = 'West Ham'; if ($team == 'Stoke City') $team = 'Stoke'; if ($team == 'West Bromwich Albion') $team = 'West Bromwich'; if ($team == 'Cercle Brugge KSV') $team = 'Cercle Brugge'; if ($team == 'Borussia Monchengladbach') $team = 'B. Monchengladbach'; if ($team == 'Wolverhampton Wanderers') $team = 'Wolves'; if ($team == 'Stoke City') $team = 'Stoke'; if ($team == 'Lokeren SNW') $team = 'Lokeren'; if ($team == 'Standard Liege') $team = 'Standard'; if ($team == 'Zulte-Waregem') $team = 'Waregem'; if ($team == 'Zulte Waregem') $team = 'Waregem'; if ($team == 'Inverness CT') $team = 'Inverness C'; if ($team == 'Nottm Forest') $team = 'Notts Forest'; if ($team == 'Sheff Wed') $team = 'Sheffield Weds'; if ($team == 'De Graafschap') $team = 'Graafschap'; if ($team == 'Leeds United') $team = 'Leeds'; if ($team == 'Tottenham Hotspur') $team = 'Tottenham'; if ($team == 'Birmingham City') $team = 'Birmingham'; if ($team == 'Bolton Wanderers') $team = 'Bolton'; if ($team == 'Derby County') $team = 'Derby'; if ($team == 'Ipswich Town') $team = 'Ipswich'; if ($team == 'Huddersfield Town') $team = 'Huddersfield'; if ($team == 'Rotherham United') $team = 'Rotherham'; if ($team == 'FC Ingolstadt 04') $team = 'Ingolstadt'; if ($team == 'Cologne') $team = 'FC Koln'; if ($team == 'SV Darmstadt 98') $team = 'Darmstadt'; if ($team == 'Rayo Vallecano') $team = 'Vallecano'; if ($team == 'Atletico Madrid') $team = 'Ath Madrid'; if ($team == 'Athletic Bilbao') $team = 'Ath Bilbao'; if ($team == 'Sporting Gijon') $team = 'Sp Gijon'; if ($team == 'Villareal') $team = 'Villarreal'; if ($team == 'Inter Milan') $team = 'Inter'; if ($team == 'Uniao da Madeira') $team = 'Uniao Madeira'; if ($team == 'Milton Keynes Dons') $team = 'MK Dons'; if ($team == 'Sheffield Wednesday') $team = 'Sheffield Weds'; if ($team == 'Leicester City') $team = 'Leicester'; if ($team == 'Norwich City') $team = 'Norwich'; if ($team == 'Inverness CT') $team = 'Inverness C'; if ($team == 'Swansea City') $team = 'Swansea'; if ($team == 'PEC Zwolle') $team = 'Zwolle'; if ($team == 'Cambuur Leeuwarden') $team = 'Cambuur'; if ($team == 'ADO Den Haag') $team = 'Den Haag'; if ($team == 'Heracles Almelo') $team = 'Heracles'; if ($team == 'Roda JC Kerk ') $team = 'Roda'; if ($team == 'FC Utrecht') $team = 'Utrecht'; if ($team == 'Gazelec Ajaccio') $team = 'Ajaccio'; if ($team == 'Partick Thistle') $team = 'Partick'; if ($team == 'Newcastle United') $team = 'Newcastle'; if ($team == 'FC Twente') $team = 'Twente'; if ($team == 'NEC Nijmegen') $team = 'Nijmegen'; if ($team == 'Vitesse Arnhem') $team = 'Vitesse'; if ($team == 'Waasland Beveren') $team = 'Waasland'; if ($team == 'Roda JC Kerk') $team = 'Roda'; if ($team == 'Mersin I.Y.') $team = 'Mersin Idman Yurdu'; if ($team == 'Kasimpasaspor') $team = 'Kasimpasa'; if ($team == 'Akhisar Belediye') $team = 'Akhisar Belediyespor'; if ($team == 'Preston North End') $team = 'Preston'; if ($team == 'MK Dons') $team = 'Milton Keynes Dons'; if ($team == 'Nottingham Forest') $team = 'Notts Forest'; if ($team == 'Hull City') $team = 'Hull'; if ($team == 'A Villa') $team = 'Aston Villa'; if ($team == 'C Palace') $team = 'Crystal Palace'; if ($team == 'Charlton Athletic') $team = 'Charlton'; if ($team == 'Brighton and Hove Albion') $team = 'Brighton'; if ($team == 'Sporting Lisbon') $team = 'Sp Lisbon'; if ($team == 'Hertha Berlin') $team = 'Hertha'; if ($team == 'Borussia Dortmund') $team = 'Dortmund'; if ($team == 'B. Monchengladbach') $team = 'Munchen Gladbach'; if ($team == 'Vitoria de Guimaraes') $team = 'Guimaraes'; if ($team == 'Istanbul Buyuksehir') $team = 'Buyuksehir'; if ($team == 'Buyuksehir') $team = 'Buyuksehyr'; if ($team == 'Deportivo La Coruna') $team = 'La Coruna'; if ($team == 'Real Sociedad') $team = 'Sociedad'; if ($team == 'Deportivo La Coruna') $team = ' La Coruna'; if ($team == 'Bayer Leverkusen') $team = 'Leverkusen'; if ($team == 'Hannover 96') $team = 'Hannover'; if ($team == 'KV Oostende') $team = 'Oostende'; if ($team == 'Cologne ') $team = 'FC Koln'; if ($team == 'W Bremen') $team = 'Werder Bremen'; if ($team == 'Frankfurt') $team = 'Ein Frankfurt'; if ($team == 'Eintracht Frankfurt') $team = 'Ein Frankfurt'; if ($team == 'B Dortmund') $team = 'Dortmund'; if ($team == 'Schalke') $team = 'Schalke 04'; if ($team == 'Bay Munich') $team = 'Bayern Munich'; if ($team == 'Mgladbach') $team = 'Munchen Gladbach'; if ($team == 'FC Augsburg') $team = 'Augsburg'; if ($team == 'AC Milan') $team = 'Milan'; if ($team == 'PSV') $team = 'PSV Eindhoven'; if ($team == 'RKC') $team = 'Waalwijk'; if ($team == 'NAC') $team = 'NAC Breda'; if ($team == 'NEC') $team = 'Nijmegen'; if ($team == 'H Almelo') $team = 'Heracles'; if ($team == 'FC Zwolle') $team = 'Zwolle'; if ($team == 'Vitesse A') $team = 'Vitesse'; if ($team == 'KV Mechelen') $team = 'Mechelen'; if ($team == 'PSG') $team = 'Paris SG'; if ($team == 'AC Ajaccio') $team = 'Ajaccio'; if ($team == 'Valencnes') $team = 'Valenciennes'; if ($team == 'FC Zwolle') $team = 'Zwolle'; if ($team == 'R Madrid') $team = 'Real Madrid'; if ($team == 'A Madrid') $team = 'Ath Madrid'; if ($team == 'Celta Vigo') $team = 'Celta'; if ($team == 'Espanyol') $team = 'Espanol'; if ($team == 'Real Betis') $team = 'Betis'; if ($team == 'R Vallecano') $team = 'Vallecano'; if ($team == 'Zaragotha') $team = 'Zaragoza'; if ($team == 'S Liege') $team = 'Standard'; if ($team == 'AA Gent') $team = 'Gent'; if ($team == 'AA Gent (Bel)') $team = 'Gent'; if ($team == 'OH Leuven') $team = 'Oud-Heverlee Leuven'; if ($team == 'KV Kortrijk') $team = 'Kortrijk'; if ($team == 'Z-Waregem') $team = 'Waregem'; if ($team == 'Mons') $team = 'Bergen'; if ($team == 'Waasland') $team = 'Waasland-Beveren'; if ($team == 'West Bromwich') $team = 'West Brom'; if ($team == 'Manchester City') $team = 'Man City'; if ($team == 'Waasland') $team = 'Waasland-Beveren'; if ($team == 'Ross Co') $team = 'Ross County'; if ($team == 'Inverness') $team = 'Inverness C'; if ($team == 'St Jstone') $team = 'St Johnstone'; if ($team == 'Hamilton Academical') $team = 'Hamilton'; if ($team == 'Dundee Utd') $team = 'Dundee United'; if ($team == 'Paris St Germain') $team = 'Paris SG'; if ($team == 'AS Nancy') $team = 'Nancy'; if ($team == 'Roda JC') $team = 'Roda'; if ($team == 'Cardiff City') $team = 'Cardiff'; if ($team == 'Blackburn Rovers') $team = 'Blackburn'; if ($team == 'V. Setubal') $team = 'Setubal'; if (substr($team,0,10) == 'Vitoria Fu') $team = 'Setubal'; if ($team == 'FC Porto') $team = 'Porto'; if ($team == 'Vitoria S.C') $team = 'Guimaraes'; if ($team == 'Braga') $team = 'Sp Braga'; if ($team == 'SC Olhanense') $team = 'Olhanense'; if ($team == 'Sporting') $team = 'Sp Lisbon'; if ($team == 'P Ferreira') $team = 'Pacos Ferreira'; return $team; } [/insert_php]