Pinny XML Feed Back Working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jjgold
    SBR Aristocracy
    • 07-20-05
    • 388179

    #1
    Pinny XML Feed Back Working
    Lots of releived bettors and programmers now

    Good Job Pinny
  • Illusion
    Restricted User
    • 08-09-05
    • 25166

    #2
    Thank goodness.
    Comment
    • jjgold
      SBR Aristocracy
      • 07-20-05
      • 388179

      #3
      Illusion many guys rely on this feed to bet
      Comment
      • Illusion
        Restricted User
        • 08-09-05
        • 25166

        #4
        Originally posted by jjgold
        Illusion many guys rely on this feed to bet
        As do I jj.
        Comment
        • jjgold
          SBR Aristocracy
          • 07-20-05
          • 388179

          #5
          (Wed) 8:05PM EST Florida Marlins (A. Burnett) -162 vs Milwaukee Brewers (T. Ohka) 154 Total 7.5(Wed) 10:05PM EST New York Mets (J. Seo) -131 vs Arizona D-Backs (R. Ortiz) 123 Total 9.5(Wed) 10:05PM EST Houston Astros (E. Astacio) 103 vs San Diego Padres (C.H. Park) -111 Total 8(Wed) 10:10PM EST Colorado Rockies (B.H. Kim) 147 vs Los Angeles Dodgers (D. Houlton) -155 Total 8.5(Wed) 10:15PM EST Philadelphia Phillies (C. Lidle) -112 vs San Francisco Giants (B. Hennessey) 104 Total 8.5(Wed) 8:05PM EST Seattle Mariners (R. Franklin) 129 vs Texas Rangers (J. Dominguez) -137 Total 11(Wed) 8:10PM EST Boston Red Sox (M. Clement) -243 vs Kansas City Royals (D. Carrasco) 225 Total 10(Wed) 8:10PM EST Chicago White Sox (M. Buehrle) -131 vs Minnesota Twins (J. Mays) 123 Total 8.5
          Comment
          • pico
            BARRELED IN @ SBR!
            • 04-05-07
            • 27321

            #6
            jj, does the xml feed still works?
            Comment
            • Scorpion
              SBR Hall of Famer
              • 09-04-05
              • 7797

              #7
              Not very good, xml feed does not include the run lines for the first 5 innings for MLB

              C-
              Comment
              • jjgold
                SBR Aristocracy
                • 07-20-05
                • 388179

                #8
                it works but I do not use it anymore
                Comment
                • pico
                  BARRELED IN @ SBR!
                  • 04-05-07
                  • 27321

                  #9
                  how do you get xml feed off pinnacle? is there a tutorial. come you post some code, jj?
                  Comment
                  • jjgold
                    SBR Aristocracy
                    • 07-20-05
                    • 388179

                    #10
                    I paid a guy $15 on rent a coder to do it

                    Mine does not work, maybe blocked. It is basically code










                    <html>

                    <head>

                    <title>System 3.1</title>

                    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

                    <style type="text/css">

                    <!--

                    a:hover {color: #FF0000; text-decoration: none}

                    a {color: #000000; text-decoration: underline}

                    .style1 {font-family: Tahoma, "MS Sans Serif"; font-size: 8pt}

                    .btnstyle1 {BACKGROUND: ##00CC66; BORDER-BOTTOM: #CC9933 1px solid; BORDER-LEFT: #CCFFCC 1px solid; BORDER-RIGHT: #CC9933 1px solid; BORDER-TOP: #afc4d5 1px solid; COLOR: #000000; CURSOR: hand; FONT-FAMILY: tahoma, sans-serif; FONT-SIZE: 11px; HEIGHT: 19px; TEXT-DECORATION: none; border-color: #DBEAFF #8AB4E7 #8AB4E7 #DBEAFF; background-color: #DBEAFF}

                    -->

                    </style>

                    </head>





                    <?

                    echo "<span class='style1'>SERVER DATE : <b>".date("m-d-Y (D) g:iA")."</b><br><br></span>";



                    function convert_time($time){

                    $ret = '';

                    $moment=split('[-: ]',$time);

                    $data=mktime($moment[3],$moment[4],0,$moment[1],$moment[2],$moment[0]);

                    $data=$data-5*3600;

                    $ret[0] = date("(D) g:iA",$data);

                    $ret[0] .= " EST";

                    $ret[1] = date("Y-m-d",$data);

                    return $ret;

                    }



                    //set_time_limit(0);

                    require("http.php");

                    $http=new http_class;



                    $http->timeout=0;

                    $http->data_timeout=0;

                    //$http->debug=1;

                    //$http->html_debug=1;

                    $http->user_agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";

                    $http->follow_redirect=1;

                    $http->redirection_limit=5;

                    $url="http://xml.pinnaclesports.com/xmlfeed.asp?contest=no";

                    $error=$http->GetRequestArguments($url,$arguments);

                    $error=$http->Open($arguments);

                    $error=$http->SendRequest($arguments);

                    $contents='';

                    for(;

                    {

                    $error=$http->ReadReplyBody($body,1000);

                    if($error!="" || strlen($body)==0) break;

                    $contents.=$body;

                    //echo HtmlSpecialChars($body);

                    }





                    //load the XML data file into an array

                    $p = xml_parser_create();

                    xml_parser_set_option ($p,XML_OPTION_CASE_FOLDING,0);

                    //echo xml_parser_get_option ($p,XML_OPTION_CASE_FOLDING);



                    xml_parse_into_struct($p,$contents,$vals ,$index);

                    xml_parser_free($p);



                    $i=0;

                    $j=0;

                    $stop_flag=0;

                    $start_flag=1;

                    //parse the data from the array into a new array with only the fields we want

                    foreach($vals as $val) {

                    switch($i){

                    case 0 : //echo $val['tag'].'<br>';

                    if($val['tag']=='event_datetimeGMT'){

                    $rs = convert_time($val['value']);

                    $rezult[$j]['time']=$rs[0];

                    $rezult[$j]['check']=$rs[1];

                    $i=1;

                    }

                    break;

                    case 1 : //echo $val['tag'].'<br>';

                    if($val['tag']=='sporttype'){

                    //echo $val['value'].'<br>';

                    if($val['value']=='Baseball' || $val['value']=='Basketball'){

                    $rezult[$j]['sporttype']=$val['value'];

                    $i=2;

                    }

                    }

                    break;

                    case 2 : if($val['tag']=='league'){

                    if(($val['value']!='NBA' && $rezult[$j]['sporttype']=='Basketball') ||

                    ($val['value']!='MLB' && $rezult[$j]['sporttype']=='Baseball')){

                    $i=0;

                    $rezult[$j]['sporttype']='';

                    }

                    else $i=3;

                    }

                    break;

                    case 3 : if($val['tag']=='participant_name'){

                    $rezult[$j]['participant1']=$val['value'];

                    $i=4;

                    }

                    break;

                    case 4 : if($rezult[$j]['sporttype']=='Basketball') $i=5;

                    if($val['tag']=='pitcher'){

                    $rezult[$j]['pitcher1']=$val['value'];

                    $i=5;

                    }

                    break;

                    case 5 : if($val['tag']=='participant_name'){

                    $rezult[$j]['participant2']=$val['value'];

                    $i=6;

                    }

                    break;

                    case 6 : if($rezult[$j]['sporttype']=='Basketball') $i=7;

                    if($val['tag']=='pitcher'){

                    $rezult[$j]['pitcher2']=$val['value'];

                    $i=7;

                    }

                    break;

                    case 7 : if($val['tag']=='moneyline_visiting'){

                    $rezult[$j]['moneyline_visiting']=$val['value'];

                    $i=8;

                    }

                    break;

                    case 8 : if($val['tag']=='moneyline_home'){

                    $rezult[$j]['moneyline_home']=$val['value'];

                    $i=9;

                    }

                    break;

                    case 9 : if($rezult[$j]['sporttype']=='Baseball') $i=13;

                    if($val['tag']=='spread_visiting'){

                    $rezult[$j]['spread_visiting']=$val['value'];

                    $i=10;

                    }

                    break;

                    case 10 : if($val['tag']=='spread_adjust_visiting'){

                    $rezult[$j]['spread_adjust_visiting']=$val['value'];

                    $i=11;

                    }

                    break;

                    case 11 : if($val['tag']=='spread_home'){

                    $rezult[$j]['spread_home']=$val['value'];

                    $i=12;

                    }

                    break;

                    case 12 : if($val['tag']=='spread_adjust_home'){

                    $rezult[$j]['spread_adjust_home']=$val['value'];

                    $i=13;

                    }

                    break;

                    case 13 : if($val['tag']=='total_points'){

                    $rezult[$j]['total_points']=$val['value'];

                    $i=14;

                    }

                    break;

                    case 14 : if($val['tag']=='over_adjust'){

                    $rezult[$j]['over_adjust']=$val['value'];

                    $i=0;

                    if($start_flag==1)$j++;

                    }

                    break;

                    }



                    }



                    $header = "";

                    for ($i = 0; $i < count($rezult)-1; $i++) {

                    if ($rezult[$i]['check'] == date("Y-m-d")) {

                    if ($header <> $rezult[$i]['sporttype']) {

                    $header = $rezult[$i]['sporttype'];

                    if ($i <> 0) { echo '</table><br>'; }

                    echo '<table width="100%" border="0" cellspacing="0" cellpadding="2" class="style1">';

                    echo '<tr bgcolor="#FF3300"><td><div align="center"><b><font color="#FFFFFF">'.$header.'</font></b></div></td></tr>';

                    echo '<tr><td>&nbsp;</td></tr>';

                    }

                    if ($bgcolor == "") { $bgcolor = "#F1F1F1"; } else { $bgcolor = ""; }

                    if($header == 'Baseball'){

                    echo '<tr bgcolor="'.$bgcolor.'"><td><span>'.$rezu lt[$i]['time'].' '.$rezult[$i]['participant1'].' ('.$rezult[$i]['pitcher1'].') '. $rezult[$i]['moneyline_visiting'].' vs '.$rezult[$i]['participant2'].' ('.$rezult[$i]['pitcher2'].') '. $rezult[$i]['moneyline_home'].' Total '. $rezult[$i]['total_points'].'</span></td></tr>';

                    }

                    if($header == 'Basketball'){

                    echo '<tr bgcolor="'.$bgcolor.'"><td><span>'.$rezu lt[$i]['time'].' '.$rezult[$i]['participant1'].' '.$rezult[$i]['spread_visiting'].' '.$rezult[$i]['spread_adjust_visiting'].' vs '.$rezult[$i]['participant2'].' '.$rezult[$i]['spread_home'].' '.$rezult[$i]['spread_adjust_home'].' Total '.$rezult[$i]['total_points'].'</span></td></tr>';

                    }

                    }

                    }

                    echo '<tr><td>&nbsp;</td></tr>';





                    set_time_limit(0);

                    $ch = "";

                    $ch = curl_init();

                    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1 );

                    curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1 );

                    curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,F alse);

                    curl_setopt($ch,CURLOPT_USERAGENT,"Mozil la/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");



                    $url = "http://xml.pinnaclesports.com/xmlfeed.asp";

                    curl_setopt($ch,CURLOPT_URL,$url);

                    $temp = curl_exec($ch);



                    $this_date = date("Y-m-d");

                    $write_header = "T";

                    $bgcolor = "";



                    $pattern = "'<event>[^>]*?.*?</event>'si";

                    preg_match_all($pattern,$temp,$result,PR EG_SET_ORDER);

                    for ($i = 0; $i < count($result); $i++) {

                    $skip = "F";

                    $pattern = "'<league>[^>]*?.*?</league>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $league = strip_tags($data[0][0]);



                    $pattern = "'<sporttype>[^>]*?.*?</sporttype>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $sporttype = strip_tags($data[0][0]);



                    $pattern = "'<event_datetimeGMT>[^>]*?.*?</event_datetimeGMT>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $rs = convert_time(strip_tags($data[0][0]));

                    $datetime = $rs[0];



                    if (($league == "NFL" or $league == "CFL" or $league == "NCAA" ) and $sporttype == "Football" and $rs[1] == date("Y-m-d")) {

                    if ($write_header == "T") {

                    echo '<table width="100%" border="0" cellspacing="0" cellpadding="2" class="style1">';

                    echo '<tr bgcolor="#FF3300"><td><div align="center"><b><font color="#FFFFFF">Football</font></b></div></td></tr>';

                    echo '<tr><td>&nbsp;</td></tr>';

                    $write_header = "F";

                    }



                    $pattern = "'<participant_name>[^>]*?.*?</participant_name>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $participant1 = strip_tags($data[0][0]);

                    $participant2 = strip_tags($data[1][0]);



                    $pattern = "'<spread_visiting>[^>]*?.*?</spread_visiting>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f1 = strip_tags($data[0][0]);

                    if ($f1 > 0) { $f1 = "+".$f1; }



                    $pattern = "'<spread_adjust_visiting>[^>]*?.*?</spread_adjust_visiting>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f2 = strip_tags($data[0][0]);



                    $pattern = "'<total_points>[^>]*?.*?</total_points>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f3 = strip_tags($data[0][0]);



                    $pattern = "'<spread_home>[^>]*?.*?</spread_home>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f4 = strip_tags($data[0][0]);

                    if ($f4 > 0) { $f4 = "+".$f4; }



                    $pattern = "'<spread_adjust_home>[^>]*?.*?</spread_adjust_home>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f5 = strip_tags($data[0][0]);



                    if ($bgcolor == "") { $bgcolor = "#F1F1F1"; } else { $bgcolor = ""; }

                    echo '<tr bgcolor="'.$bgcolor.'"><td><span>'.$leag ue.' '.$datetime.' '.$participant1.' '.$f1.' '.$f2.' Total '.$f3.' vs '.$participant2.' '.$f4.' '.$f5.'</span></td></tr>';

                    }

                    }

                    echo '</table>';

                    echo "<br>";



                    $ch = "";

                    $ch = curl_init();

                    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1 );

                    curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1 );

                    curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,F alse);

                    curl_setopt($ch,CURLOPT_USERAGENT,"Mozil la/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");



                    $url = "http://xml.pinnaclesports.com/xmlfeed.asp";

                    curl_setopt($ch,CURLOPT_URL,$url);

                    $temp = curl_exec($ch);



                    $this_date = date("Y-m-d");

                    $write_header = "T";

                    $bgcolor = "";



                    $pattern = "'<event>[^>]*?.*?</event>'si";

                    preg_match_all($pattern,$temp,$result,PR EG_SET_ORDER);

                    for ($i = 0; $i < count($result); $i++) {

                    $skip = "F";

                    $pattern = "'<league>[^>]*?.*?</league>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $league = strip_tags($data[0][0]);



                    $pattern = "'<sporttype>[^>]*?.*?</sporttype>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $sporttype = strip_tags($data[0][0]);



                    $pattern = "'<event_datetimeGMT>[^>]*?.*?</event_datetimeGMT>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $rs = convert_time(strip_tags($data[0][0]));

                    $datetime = $rs[0];



                    if ($write_header == "T") {

                    echo '<table width="100%" border="0" cellspacing="0" cellpadding="2" class="style1">';

                    echo '<tr bgcolor="#FF3300"><td><div align="center"><b><font color="#FFFFFF">NCAA Basketball</font></b></div></td></tr>';

                    echo '<tr><td>&nbsp;</td></tr>';

                    $write_header = "F";

                    }

                    if ((strtoupper($league) == "NCAA" ) and $sporttype == "Basketball" and $rs[1] == date("Y-m-d")) {





                    $pattern = "'<participant_name>[^>]*?.*?</participant_name>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $participant1 = strip_tags($data[0][0]);

                    $participant2 = strip_tags($data[1][0]);



                    $pattern = "'<spread_visiting>[^>]*?.*?</spread_visiting>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f1 = strip_tags($data[0][0]);

                    if ($f1 > 0) { $f1 = "+".$f1; }



                    $pattern = "'<spread_adjust_visiting>[^>]*?.*?</spread_adjust_visiting>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f2 = strip_tags($data[0][0]);



                    $pattern = "'<total_points>[^>]*?.*?</total_points>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f3 = strip_tags($data[0][0]);



                    $pattern = "'<spread_home>[^>]*?.*?</spread_home>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f4 = strip_tags($data[0][0]);

                    if ($f4 > 0) { $f4 = "+".$f4; }



                    $pattern = "'<spread_adjust_home>[^>]*?.*?</spread_adjust_home>'si";

                    preg_match_all($pattern,$result[$i][0],$data,PREG_SET_ORDER);

                    $f5 = strip_tags($data[0][0]);



                    if ($bgcolor == "") { $bgcolor = "#F1F1F1"; } else { $bgcolor = ""; }

                    echo '<tr bgcolor="'.$bgcolor.'"><td><span>'.$leag ue.' '.$datetime.' '.$participant1.' '.$f1.' '.$f2.' Total '.$f3.' vs '.$participant2.' '.$f4.' '.$f5.'</span></td></tr>';

                    }

                    }

                    echo '</table>';

                    echo "<br>";
                    Comment
                    Search
                    Collapse
                    SBR Contests
                    Collapse
                    Top-Rated US Sportsbooks
                    Collapse
                    Working...