Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Aug 9, 2019
1 parent 39391da commit 019ea06
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Open a command console, enter your project directory and execute the following
command to download the latest stable version of this package:

```bash
$ composer require webeweb/xmltv-library "^1.0"
$ composer require webeweb/xmltv-library
```

This command requires you to have Composer installed globally, as explained in
Expand Down
23 changes: 23 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

/*
* This file is part of the xmltv-library package.
*
* (c) 2019 WEBEWEB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

require_once __DIR__ . "/vendor/autoload.php";

use WBW\Library\XMLTV\XMLTV;

$tv = XMLTV::parseXML("/home/camille/Downloads/tvguide.xml");

$channels = $tv->indexChannelsById();
foreach ($channels["C192.api.telerama.fr"]->getProgrammes() as $current) {
echo $current->getStartDateTime()->format("d/m/Y H:i:s") . "\n";
}

$debug = "breakpoint";

0 comments on commit 019ea06

Please sign in to comment.