XMLTV.EXE and tv_grab_na_dd

Discussion about Schedules Direct grabber code and data formats.

XMLTV.EXE and tv_grab_na_dd

Postby 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
sbtvlist
 
Posts: 38
Joined: Fri Aug 17, 2007 10:29 pm

Re: XMLTV.EXE and tv_grab_na_dd

Postby 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
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: XMLTV.EXE and tv_grab_na_dd

Postby 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/tmsdatadirect/schedulesdirect/tvDataDelivery.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);

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

Re: XMLTV.EXE and tv_grab_na_dd

Postby 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.
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX

Re: XMLTV.EXE and tv_grab_na_dd

Postby 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?
sbtvlist
 
Posts: 38
Joined: Fri Aug 17, 2007 10:29 pm

Re: XMLTV.EXE and tv_grab_na_dd

Postby 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
rmeden
SD Board Member
 
Posts: 1495
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX


Return to Developers Corner

Who is online

Users browsing this forum: No registered users and 1 guest