Resource icon

Non-OBS Script Open Broadcaster Software XML & RSS Data Reader 1.5

Christer

New Member
Christer submitted a new resource:

Open Broadcaster Software XML & RSS Data Reader - Now you too can have realtime data showing information to your viewer, just like on the TV-news.

The Open Broadcaster Software XML & RSS Data Reader helps you fetch and show data from RSS-feeds in your stream. Now you too can have realtime data showing information to your viewer, just like on the TV-news broadcast.

The script opens the feed and saves the data into a text file that you can use for your stream.

REQUIREMENTS
  • Open Broadcaster Software (duh!)
  • Local webhost with php capabilities
    (Apache, nginx, IIS)

HOW TO

Put the file in your local webservers public...

Read more about this resource...
 

Christer

New Member
Sure, it's just a simple php-script.

It basically fetches the data from the feed and uses the function simplexml to format it and save to a text-file. You could od something similar to Twitter-feeds I suppose. OBS only reads text-data from line 1 in the text-module, so it will take some work to fetch and format it.

Followers/Subscribers/Donations is a whole other thing. But as long as you can get a RSS / XML-feed you can put it in as a URL in the script. And if you are using Twitch there are other scripts that already do this for you, ie. Nightbot etc.

A few resources for Twitch,

I might look into Twitter feeds for next version.
Feel free to develop this script further and share your updates!

Thank you for downloading and using it! :)
 

Christer

New Member
Please make the video tutorial for
RSS Data Reader 1.0 , how use 2 or 3 rss bars?

I think my description with instructions is pretty clear, read them and follow them. This is basically just a way of using OBS features.
Making the "bars" is easy, just insert images and let the text scroll on top of them.
My script only collects data and puts them in a text file, for you to read and show on your stream.

Read the OBS Faq or guide on youtube on how to set up your channel. :)
 

diethylamide

New Member
All i did was replace the first URL with an RSS feed url. But there are no results in the textfile and I get these error messages:

Notice
: Undefined variable: news in D:\user\xampp\htdocs\newsfeed\datareader.php on line 33

Notice: Undefined variable: market in D:\user\xampp\htdocs\newsfeed\datareader.php on line 51

What am I doing wrong? Or does this only work with the specific Eve feed?
 
Last edited:

Christer

New Member
Sorry for this late reply. :)
As it says, your variable is undefined, meaning it does not recieve any data to the variable.
Check that you have put a RSS-feed that actually works, and that you have included the ' -signs around the url.

This is line 40,
PHP:
$ch2 = curl_init('http://www.eve-markets.net/api/xml?rss=1&listid=9486&key=8ZN3CoKl5hdiqt');

Basically what it does is reading the url, and saves the data to the txt-file. In this case, the market data goes into market.txt. This file is then read into OBS for display at your chosen part of the screen.

You can also test your feeds by uncommenting the debugging lines 27 & 47, they print the raw data to your screen.

NOTE: Not all RSS-feeds look the the same, they may have a different structure on itle and content. Make sure these things are formatted properly.
 
Last edited:

Christer

New Member
Please anybody make video tutorial for this scripts.I'm not understand how it's work.

You will have to edit datareader.php enad replace with your own RSS-feeds. Then you need to create your own graphics for your channel, you then use the text-files generated by the script to show the text content in your stream. Basic use of OBS, really. :)
 

AIFIPTV

New Member
Hi – is this possible with rss application without server – For instance Feed Demon od similar – Those application reside on desktop without server and get RSS automatically – If it will possible to use this kind of script in correlation with those kind of application it will be great – Thanks in advance
 

Christer

New Member
Well, I have'nt tried it...but as explained earlier in this thread, this script fetches the RSS-feed and saves it in a text-file. The Feed Daemon client is pretty much the same, but is displays your feeds instead.

The whole point of this script is to collect a rss-feed and store it in a text file that OBS displays in stream, on top of your grapichal objects.
 

Greg1756

New Member
I've taken out only the links in the datareader.php file in the download and it doesn't work. I left everything else in the file the exact same (even the file names!)

I tried it out with the following two links: http://feeds.thescoreesports.com/hots.rss and http://sports.espn.go.com/espn/rss/news but when I open the datareader from the localhost it gives the following error;

Fatal error: Uncaught Exception: String could not be parsed as XML in C:\xampp\htdocs\datareader.php:24 Stack trace: #0 C:\xampp\htdocs\datareader.php(24): SimpleXMLElement->__construct('') #1 {main} thrown in C:\xampp\htdocs\datareader.php on line 24

Line 24 is;

$rss1 = new SimpleXMLElement($data1);

I'd appreciate any help greatly.
 

Christer

New Member
I've taken out only the links in the datareader.php file in the download and it doesn't work. I left everything else in the file the exact same (even the file names!)

I tried it out with the following two links: http://feeds.thescoreesports.com/hots.rss and http://sports.espn.go.com/espn/rss/news but when I open the datareader from the localhost it gives the following error;

Fatal error: Uncaught Exception: String could not be parsed as XML in C:\xampp\htdocs\datareader.php:24 Stack trace: #0 C:\xampp\htdocs\datareader.php(24): SimpleXMLElement->__construct('') #1 {main} thrown in C:\xampp\htdocs\datareader.php on line 24

Line 24 is;

$rss1 = new SimpleXMLElement($data1);

I'd appreciate any help greatly.

Thanx for feedback. This script is just a fast "hack-together-solution" for my own purpose. I am in the works of rewriting it, and maybe make it a little better.
 

Christer

New Member
I've taken out only the links in the datareader.php file in the download and it doesn't work. I left everything else in the file the exact same (even the file names!)

I tried it out with the following two links: http://feeds.thescoreesports.com/hots.rss and http://sports.espn.go.com/espn/rss/news but when I open the datareader from the localhost it gives the following error;

Fatal error: Uncaught Exception: String could not be parsed as XML in C:\xampp\htdocs\datareader.php:24 Stack trace: #0 C:\xampp\htdocs\datareader.php(24): SimpleXMLElement->__construct('') #1 {main} thrown in C:\xampp\htdocs\datareader.php on line 24

Line 24 is;

$rss1 = new SimpleXMLElement($data1);

I'd appreciate any help greatly.

Attached to this post is a modified version that works for your ESPN.GO-feed. It should work with your other feed too, but I could not get it to collect the description.

You will have to modify the script a bit if you want other feeds, you'll have to check the structure of the feed and edit the script accordingly. If you check espn-feed, and compare what I've done in the script, you'll soon understand how to operate it.

All titles are save into a textfile called news.txt, this is the file you use in OBS to scroll the headlines. They are separated with a *-sign.
 

Attachments

  • xmlreader.zip
    933 bytes · Views: 320

Christer

New Member
Christer updated Open Broadcaster Software XML & RSS Data Reader with a new update entry:

XML Reader for Windows

Script is now available as a console application for Windows.
Just put the extracted folder where you can run it without admin rights.
Run the program (xmlreader2016.exe) and paste in your RSS-feed URL, enter a filename and it will fetch the feed for you and put it in the text file.

Textfile is located in a folder called 'rssfeeds'. This is the textfile you need to use as source for your text scroller in OBS.

Note: Graphics are not included, you can easily create your own graphics to use...

Read the rest of this update entry...
 

Christer

New Member
I have now updated this script to a Windows Console Application instead, now there's no need for a webserver. Only drawback is that it only works on Windows. :)
 

Rasta Monkey

New Member
I have now updated this script to a Windows Console Application instead, now there's no need for a webserver. Only drawback is that it only works on Windows. :)
Hi Christer, I used the 1.5 windows option (using win10). Everything seemed to work fine, the feed displayed, said it saved, tho there is no file in the folder. Thanks for creating the script.
Jeff
 

Christer

New Member
Hi!
Yes, that's probably because program is not run as admin.
I thought about doing a file check. I'll look into implementing this in next version.

Your whole issue has do with rights in your system. Try moving program to a folder where you have rights to create files automatically, and try running it with admin rights.

Don't forget to vote! :)
 
Top