Type
Bug
Status
Closed
Reported By
David Goldstein
Component
API
Resolution
Not a Bug
Votes
0
Created
17/Jul/13 12:58 PM EDT
Closed
17/Jul/2013 2:09 PM EDT
Description
Trying to get boxscore for MLB game. Building off of PHP example (https://erikberg.com/api/examples/php). I changed $method to equal 'boxscore' and $parameters to equal array('event_id' => '20130710-new-york-mets-at-san-francisco-giants'). I get the following errors: Warning: fopen() [function.fopen]: HTTP request failed! HTTP/1.1 404 Not Found in /home/golddave/public_html/mostlymets/wp-content/ticketnetwork/test2.php on line 143 Warning: fopen(compress.zlib://https://erikberg.com/boxscore.json?event_id=20130710-new-york-mets-at-san-francisco-giants) [function.fopen]: failed to open stream: operation failed in /home/golddave/public_html/mostlymets/wp-content/ticketnetwork/test2.php on line 143 I've played around with my code to try to figure out why it's not working but haven't been able to figure it out. What am I doing wrong?
Closing Comment
Look at the documentation and example request for MLB Box Score. <a href="/api#boxscore">/api#boxscore</a> Your script is creating a URL like: https://erikberg.com/boxscore.json?event_id=20130710-new-york-mets-at-san-francisco-giants And it needs to create a URL like: <a href="/mlb/boxscore/20130710-new-york-mets-at-san-francisco-giants.json">/mlb/boxscore/20130710-new-york-mets-at-san-francisco-giants.json</a> Please don't file bug reports for support requests. Would rather direct email instead.
Comments
1. David Goldstein 17/Jul/2013 at 2:01 PM EDT
I figured it out. I needed to append the event_id to the method instead of adding it as a parameter. My bad. Sorry for the false alarm.