|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#481 |
Major Dude
|
so right now the script takes advantage of twitters ability to deny a new tweet if its identical to the last. if you were to include the listener count, you would potentially have a new tweet every time you call the script, since the listener count could be different, thus in turn the tweet would be different from the last because of the listener count.
for those who have the script setup to be called via a cron job or having the page auto refresh in the browser, that could be as often as once a minute, or how often the refresh timeout is set within the script. if however you have things setup so that your calling the script when the track changes things would be a bit easier. i currently have a script called 'metapush' which checks the playlist history file thats generated by the source software. it checks once a minute. if theres a new entry at the end of the list, i have it call the twittercast script, send the title updates out to all my streaming servers, update the titles that get displayed on the website, in the mobile apps, within the video stream, etc. i have re-added the auto refresh into the code on github. |
![]() |
![]() |
![]() |
#482 |
Major Dude
|
i have also re-added support for multiple servers, and displaying the listener count as an option.
|
![]() |
![]() |
![]() |
#483 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
The script I use at present runs on a 1 minute cron and shows the listener numbers, but changes in the listener total doesn't trigger a repost of the tweet.
The script is called when the track changes as the listener numbers are generated by the Twittercast [Shoutcast] script and not the stream title. Hope that helps. Would you like me to pm you the scripts I'm using now.. |
![]() |
![]() |
![]() |
#484 |
Major Dude
|
alright i have modified the script so that it will only send a status update if the track is different from the last time it checked using a static text file.
|
![]() |
![]() |
![]() |
#485 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
We are nearly there..
It's posting to Twitter, but it's not showing the title or the correct listener count. Can you please confirm I have the correct format for Shoutcast 1 server: $ip[0] = "fr1.1mix.co.uk"; $port[0] = "8000"; $sid[0] = "1"; Also it's not generating the title.txt file and I have this set as /TwittercastNew/title.txt where the path from the root is public_html/TwittercastNew/title.txt Many thanks again for your help. |
![]() |
![]() |
![]() |
#486 |
Major Dude
|
format is correct.
make sure you have set permissions 777 on the title.txt file |
![]() |
![]() |
![]() |
#487 |
Major Dude
|
for the path specify the full path
/home/username/public_html/TwittercastNew/title.txt or the path relative to the script... if the title.txt file and shoutcast.php are in the same directory. just specify 'title.txt' in the path config option also if you want, while testing, // comment out the line that posts to twitter so you can check the output without having it post every time, once your satisfied with the output that you see in the browser, you cn then uncomment that line again and it will start posting |
![]() |
![]() |
![]() |
#488 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
Many thanks for the replies..
I have set title.txt to 777 as suggested. I've changed the path to just title.txt as it's in the same folder as all the other files. I uploaded an updated title.txt with a dummy track title and refreshed the page and nothing changed. I then viewed title.text and found it was blank. Can you explain which line to comment out to prevent it from posting please.. http://fr1.1mix.co.uk/TwittercastNew/shoutcast.php http://fr1.1mix.co.uk/TwittercastNew/title.txt Thanks again.. |
![]() |
![]() |
![]() |
#489 |
Major Dude
|
code: like that |
![]() |
![]() |
![]() |
#490 |
Major Dude
|
also.. make a copy of your shoutcast.php file rename it to something.txt, remove your api credentials from the top and then pm me the url to the txt so i can see the source
|
![]() |
![]() |
![]() |
#491 |
Major Dude
|
ok i think i got it.. no need to send me the source. grab the updated code from github
|
![]() |
![]() |
![]() |
#492 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
I've pm'd you the shoutcast.php file as that was easier..
Thanks again |
![]() |
![]() |
![]() |
#493 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
I've updated everything below // END CONFIGURATION and it's still the same I'm afraid..
|
![]() |
![]() |
![]() |
#494 |
Major Dude
|
again. get the new code from github. please look at it carefully... there are changes made to the server blocks...
|
![]() |
![]() |
![]() |
#495 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
Many thanks for all your hard work on this - I'm pleased to say that correcting my errors, and updating to the latest script and now it seems to be working..
Thanks so much ![]() |
![]() |
![]() |
![]() |
#496 |
Major Dude
|
excellent glad its workin for ya...
|
![]() |
![]() |
![]() |
#497 |
Major Dude
|
thanks breenda... who would have thought the most active thread in the shoutcast section would be my twittercast script lol...
|
![]() |
![]() |
![]() |
#498 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
It's fantastic that your work will help so many others who want to do the same with their radio stations..
|
![]() |
![]() |
![]() |
#499 |
Major Dude
|
im actually in the middle of re-writing the script to use the xml output of either v1 or 2. as it stands right now the script is simply parsing the text, using commas as the delimiter for each field.. the obvious problem here is if the track name has a comma in it, the title will only be up to the comma. it will truncate the rest.
so instead ill use the xml output which will resolve that issue. |
![]() |
![]() |
![]() |
#500 |
Major Dude
Join Date: Sep 2003
Location: Harpurhey, Manchester UK
Posts: 1,325
|
I'm now referring people to the Github downloads from my blog post about Twitter scripts for Shoutcast...
I know people who've been after a v2 script for a while now. I don't have a way to test this at present as I'm not streaming but its bound to be useful for those who need to test them. Keep up the good work Dopelabs! |
![]() |
![]() |
![]() |
#501 |
Major Dude
|
i use the same script. all my servers are either icecast or shoutcast v2... im actually combining the shout and ice scripts into a single script that will use the xml stats output since theres still a few issues when using 7.html on the shoutcast side.
|
![]() |
![]() |
![]() |
#502 |
Junior Member
Join Date: Feb 2018
Posts: 1
|
Please is anybody's script still working since twitter changed the authentication method from basic to oauth?What does one need to do to get it to work?
Please?I am losing followers and listeners. |
![]() |
![]() |
![]() |
#503 |
Major Dude
|
the script should already be using oauth/api. mine still works just fine..
twitter.com/dubstepfm |
![]() |
![]() |
![]() |
#504 |
Junior Member
Join Date: Jan 2017
Posts: 24
|
This failed.
|
![]() |
![]() |
![]() |
#505 |
Major Dude
|
how did it fail?
|
![]() |
![]() |
![]() |
#506 |
Junior Member
Join Date: Jan 2017
Posts: 24
|
Yeah, thank you, it has worked fine. https://twitter.com/tosuthienvn
|
![]() |
![]() |
![]() |
#507 |
Junior Member
Join Date: Jan 2017
Posts: 24
|
it fails again.
|
![]() |
![]() |
![]() |
#508 |
Major Dude
|
mine still works fine.. also i cant help if you dont provide some more info as to what wrong
|
![]() |
![]() |
![]() |
#509 |
Junior Member
Join Date: Feb 2010
Posts: 39
|
Working as intended. Thanks for this.
Meant to ask one thing, is there a way to not to post a particular song to twitter, when the script runs automatically via CRON job? Like the script triggering when my Ads are playing, I don;t want to post that info on Twitter. Thank you. |
![]() |
![]() |
![]() |
#510 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
Can I suggest you rename the ads files so they appear on Twitter as station ID's - that way you can use them to advantage.
|
![]() |
![]() |
![]() |
#511 | |
Major Dude
|
Quote:
if you are contractually obligated to have a specific titles for the ads, i have updated the scripts on the github page to include support for not tweeting if it contains the text you specify. see $adtext configuration item |
|
![]() |
![]() |
![]() |
#512 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
Fab
![]() |
![]() |
![]() |
![]() |
#513 | |
Junior Member
Join Date: Feb 2010
Posts: 39
|
Quote:
Yes, I have to set a specific metadata for the ad files to make them trigger. |
|
![]() |
![]() |
![]() |
#514 |
Junior Member
Join Date: Jul 2016
Posts: 7
|
DopeLabs i cant seem to get the song to twitter script to work
i have put the correct info in |
![]() |
![]() |
![]() |
#515 |
Major Dude
|
have you checked your web server and/or php error logs?
are you able to see the song title if you view the script in a browser? |
![]() |
![]() |
![]() |
#516 |
Banned
Join Date: Aug 2018
Posts: 3
|
Hello are you still taking requests for your Twittercast website? I not too long ago started a new radio station and would like to get set up with that as well.
( it only took me 4 posts to start spamming before i met) ![]() |
![]() |
![]() |
![]() |
#517 |
Major Dude
|
sure.. register then send me the email address you used to register in a private msg here...
|
![]() |
![]() |
![]() |
#518 |
Junior Member
Join Date: Sep 2018
Posts: 1
|
Hi, this script works with XAMPP? Because I tried and I only get a blank screen when I open the shoutcast.php and it doesnt post to twitter.
|
![]() |
![]() |
![]() |
#519 |
Major Dude
|
yes it will work with apache and php..
check your php and apache error log files |
![]() |
![]() |
![]() |
#520 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 147
|
Hello, I need some help please.
Last week my host moved my server to a new datacentre - the IP stays the same, but since the move it's not posting to Twitter. I have no idea why this should happen as the text file is still being updated and the only other thing that's happened is the sever was powered down for the move. I checked the problem isn't the cron not running as it still doesn't run if I view the file in my browser. I also checked the twitter widget is still active. Can you suggest anything else I can check please as my knowledge is limited. Thanks in advance.. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|