You are here:  » Trying to get the data to show for 7 days


Trying to get the data to show for 7 days

Submitted by JohnnyBoy on Tue, 2008-03-25 20:36 in

I am trying to get the data to show and it is not displaying any of it... Also I want it for a 7 day span which I can not get that to work right... any help would be appreciated...

Thank You in Advance

{code saved}

Submitted by support on Wed, 2008-03-26 09:53

Hello Johhny,

I saved your code as it contained some possibly sensitive code. Anyway, in terms of not displaying anything - as you code looked fine i've just uploaded it to this server, and it is certainly displaying everything that is in the feed:

http://www.magicparser.com/examples/pointspread.php

Is this the same as the output you are seeing?

If you are only seeing the table header on your server, it is possible that fopen() by URL is currently disabled. The first thing I would do is add a call to print any error that occured in Magic Parser after the call to MagicParser_parse(), so, add this on the last line of the PHP:

  print MagicParser_getErrorMessage();

If that indicates that the file could not be opened - please check the information about enabling URL wrappers in this thread. Otherwise, please let me know how the output you are seeing her differs from what you are trying to achieve, particularly regarding the 7 day output...

Cheers,
David.

Submitted by JohnnyBoy on Wed, 2008-03-26 22:13

Hello

Thanks for the help again...
http://www.sportsrumble.net/phpinfo.php
This shows that fopen is on and I do not get any data shown at all like your link shows... I only get the first table that shows the sportsbook images... I used print MagicParser_getErrorMessage(); and it shows no errors...

and this still does not even solve the 7 day issue either.. I wonder whats wrong?

Submitted by support on Thu, 2008-03-27 13:59

Hello Johnny,

Can you post me a link to the script running on your server....

Thanks,
David.

Submitted by JohnnyBoy on Thu, 2008-03-27 14:40

OK I got it to work now which was a php_safemode issue... S0 thank you very much for your help... so now how do I Change it from just grabbing todays data o grabbing a 7 dyas worth of data... or changing it to only three days if I choose so....

Here is the link to that test page anyways...
http://sportsrumble.net/odds/index.php

Here is the code I have for it to grab just the one days worth of data
Thank you again... This program and its support is simply the best I have seen on the internet ever...

  function myRecordHandler($record)
  {
    global $counter;
    //Convert the time
     $time = $record["GAME-DATE"]." ".$record["GAME-TIME"];
     $time = strtotime($time);
     $time = date("g:i A",$time);
    //Convert the Date
     $date = $record["GAME-DATE"]." ".$record["GAME-TIME"];
     $date = strtotime($date);
     $date = date("d-M",$date);
    //Get today's date
     $today = date("d-M");
    //Exit if not today
    if ($date <> $today) return;
    //Display the game
    if ($counter++ % 2)
    {

Submitted by support on Thu, 2008-03-27 14:43

Hi Johnny,

As the date doesn't seem to be a configurable parameter in the request to pointspread.com, you probably need to contact their tech support for the use of the feed to see if there are any parameters you can add to the URL to give you more days...

Cheers,
David.