Page 1 of 1

XMLTV.EXE and tv_grab_na_dd

Posted: Fri May 29, 2015 6:24 pm
by sbtvlist
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

Re: XMLTV.EXE and tv_grab_na_dd

Posted: Fri May 29, 2015 10:16 pm
by rmeden
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

Re: XMLTV.EXE and tv_grab_na_dd

Posted: Sat May 30, 2015 12:12 pm
by sbtvlist
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);

?>

Re: XMLTV.EXE and tv_grab_na_dd

Posted: Sat May 30, 2015 3:56 pm
by rmeden
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.

Re: XMLTV.EXE and tv_grab_na_dd

Posted: Mon Jun 01, 2015 8:40 am
by sbtvlist
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?

Re: XMLTV.EXE and tv_grab_na_dd

Posted: Mon Jun 01, 2015 9:10 am
by rmeden
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