XMLTV.EXE and tv_grab_na_dd

Discussion about Schedules Direct grabber code and data formats.
Post Reply
sbtvlist
Posts: 38
Joined: Fri Aug 17, 2007 10:29 pm

XMLTV.EXE and tv_grab_na_dd

Post by sbtvlist » Fri May 29, 2015 6:24 pm

For years I downloaded a week lineup into a local xml file. I parse the file into an Access DB then have asp webpages do the work I need. I am going to port all this to an Apache website so the asp pages will all be rewritten into php.

My question, what method should I use to run a query on an apache server to download the listings into an xml file on the server? From there I can do what I need to do. This is only used by me but I am away from the house a lot so I want it accessible when I am on the road.

Any advice?

Steve

rmeden
SD Board Member
Posts: 1526
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: XMLTV.EXE and tv_grab_na_dd

Post by rmeden » Fri May 29, 2015 10:16 pm

I think there is a sample php DataDirect client in the sample programs.. if needed, I can dig out a copy of my test code. Be sure and replace the hostname with dd.schedulesdirect.org

Robert

sbtvlist
Posts: 38
Joined: Fri Aug 17, 2007 10:29 pm

Re: XMLTV.EXE and tv_grab_na_dd

Post by sbtvlist » Sat May 30, 2015 12:12 pm

OK, I got some data in the php soap script by changing the host name. In XMLTV there was a channel lineup and the data grabbed those channels. In the code below it doesn't appear to pull my channels. I imagine there are some configuration files. Am I on the right track in order to get an xml listing of the channels I have selelcted in my profile at SD

#!/usr/bin/php
<?php

$username='MyName';
$password='MyPassword';



$data_url='http://dd.schedulesdirect.org/tech/tmsd ... ivery.wsdl';
$start=gmdate("Y-m-d\TH:i:s\Z",time());
$stop =gmdate("Y-m-d\TH:i:s\Z",time()+3600*1);

$client = new SoapClient($data_url, array('exceptions' => 0,
'user_agent' => "php/".$_SERVER[SCRIPT_NAME],
'login' => strtolower($username),
'password' => $password));
$data = $client->download($start,$stop);

print_r($data);

?>

rmeden
SD Board Member
Posts: 1526
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: XMLTV.EXE and tv_grab_na_dd

Post by rmeden » Sat May 30, 2015 3:56 pm

at first glance it looks right. Maybe turn on exceptions and try and put $start,$stop in an array.

If that doesn't work, I'll try the code myself.

sbtvlist
Posts: 38
Joined: Fri Aug 17, 2007 10:29 pm

Re: XMLTV.EXE and tv_grab_na_dd

Post by sbtvlist » Mon Jun 01, 2015 8:40 am

The code works. One last question. Is the returned data filtered by the SD Profile Provider channel selection that we chose from the SD website?

rmeden
SD Board Member
Posts: 1526
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: XMLTV.EXE and tv_grab_na_dd

Post by rmeden » Mon Jun 01, 2015 9:10 am

sbtvlist wrote:The code works. One last question. Is the returned data filtered by the SD Profile Provider channel selection that we chose from the SD website?
Yup

Post Reply