Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Discussions

Reply
Thread Tools Search this Thread Display Modes
Old 27th March 2014, 13:57   #281
Skoubah
Junior Member
 
Join Date: Oct 2008
Posts: 15
Same here.

I had an error, played around and fixed the error, now its just blank.

I have followed the instructions to the letter....
Skoubah is offline   Reply With Quote
Old 27th March 2014, 14:21   #282
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
which script are you using (shout1/2/icecast)? how are you calling the script (cron/web)?
dopelabs is offline   Reply With Quote
Old 27th March 2014, 14:23   #283
Skoubah
Junior Member
 
Join Date: Oct 2008
Posts: 15
My server supports both v1 & v2 and i have tried both scripts.

So far just by web, if that didn't work i didn't see the need to waste time with the cron.

I keep checking twitter to see if its posted after i try but nothing.

http://www.chillaxfm.com/twitter/shoutcast_v1.php

http://www.chillaxfm.com/twitter/shoutcast_v2.php
Skoubah is offline   Reply With Quote
Old 27th March 2014, 14:26   #284
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
ok.. well i need to see the source.. feel free to send to me via msg, feel free to remove your twitter credentials but please leave the rest
dopelabs is offline   Reply With Quote
Old 29th March 2014, 21:24   #285
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
i need some help.. have a few questions
1. Can a add the files to a totally different server?
and i need help with setting up the latest twitter cast
IamJay is offline   Reply With Quote
Old 29th March 2014, 21:38   #286
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
you can add the files to your web server, or any web server that supports php


what else can i help you with?
dopelabs is offline   Reply With Quote
Old 30th March 2014, 18:02   #287
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
customer keys and all those should stay in the quotes?
IamJay is offline   Reply With Quote
Old 30th March 2014, 18:11   #288
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
yes
dopelabs is offline   Reply With Quote
Old 30th March 2014, 18:20   #289
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
someone told me that it has to be used on a vps server
IamJay is offline   Reply With Quote
Old 30th March 2014, 19:05   #290
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
incorrect. any webserver that supports php should work fine.
dopelabs is offline   Reply With Quote
Old 30th March 2014, 19:14   #291
DJ-Garybaldy
Senior Member
 
DJ-Garybaldy's Avatar
 
Join Date: Sep 2003
Location: Manchester UK
Posts: 416
Quote:
Originally Posted by dopelabs View Post
incorrect. any webserver that supports php should work fine.
The twitter script I use also needs a server that allows "fsock" connections. Without an fsock connection it won't see the shoutcast server.



Proud user of RadioDJ FREE shoutcast automation software

Online: Twitter - Facebook - Mixcloud
DJ-Garybaldy is offline   Reply With Quote
Old 30th March 2014, 19:20   #292
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
yes that is also correct..

also note that most shared hosting providers will have fsock disabled…. some providers allow you to specify your own php.ini config, but still may not allow fsock.
dopelabs is offline   Reply With Quote
Old 30th March 2014, 19:28   #293
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
anyone knows about 3jelly? the web host
IamJay is offline   Reply With Quote
Old 30th March 2014, 19:39   #294
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
the best way is to contact their support dept and ask… you might even be able to get an answer from a live chat agent if they have that service on their website…
dopelabs is offline   Reply With Quote
Old 30th March 2014, 19:46   #295
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
if you are unsure of your php configuration you can create a phpinfo page..

create a new empty file in any web accessible directory and place the following code in and save as phpinfo.php

<?php phpinfo();?>

then open your browser and open that file.
dopelabs is offline   Reply With Quote
Old 8th April 2014, 08:41   #296
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
i have updated the script again… i removed the need for a title.txt file, twitter will reject identical tweets by default. this makes setup much easier for everyone.

you can find all files, instructions, and updated files at

twittercast. dlnetworks .net
dopelabs is offline   Reply With Quote
Old 13th May 2014, 07:39   #297
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
Fatal error: Uncaught exception 'EpiTwitterForbiddenException' with message '{"errors":[{"code":170,"message":"Missing required parameter: status."}]}' in /home/u539461651/public_html/twittercast/EpiTwitter.php:265 Stack trace: #0 /home/u539461651/public_html/twittercast/EpiTwitter.php(226): EpiTwitterException::raise(Object(EpiCurlManager), false) #1 /home/u539461651/public_html/twittercast/EpiTwitter.php(127): EpiTwitterJson->__get('response') #2 /home/u539461651/public_html/twittercast/EpiTwitter.php(44): EpiTwitter->request('POST', '/statuses/updat...', Array) #3 /home/u539461651/public_html/twittercast/tweet.php(95): EpiTwitter->post('/statuses/updat...', Array) #4 {main} thrown in /home/u539461651/public_html/twittercast/EpiTwitter.php on line 265

I get that error help please
IamJay is offline   Reply With Quote
Old 13th May 2014, 23:15   #298
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
please provide me with the entire source. either
code:
in code format here
or via priv msg.
dopelabs is offline   Reply With Quote
Old 14th May 2014, 22:40   #299
dadale73
Junior Member
 
Join Date: May 2014
Posts: 1
trying to get this to work.. i get output on the page, but no tweets..

any idea or help??

http://radio.disdads.com/twittercast/icecast.php
dadale73 is offline   Reply With Quote
Old 15th May 2014, 23:58   #300
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
again.. i can not help unless i see the full source code you are using.

also please include any apache/php error logs. please look closely at the logs before replying as they may have information as to what is failing.

if you are seeing the information from the streaming server in the browser, its a good probability that your twitter app is misconfigured. a common misconfiguration is if your twitter app is a read only app. the php error log will show something like this:

PHP Fatal error: Uncaught exception 'EpiTwitterNotAuthorizedException' with message '{"request":"\/1.1\/statuses\/update.json","error":"Read-only application cannot POST."}

you would need to update the configuration of your twitter app to read and write access.
dopelabs is offline   Reply With Quote
Old 20th May 2014, 16:43   #301
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
how do i get hashtags and links to post post also?
IamJay is offline   Reply With Quote
Old 20th May 2014, 19:38   #302
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
in shoutcast*.php or icecast.php your looking for a line at the bottom that looks like this

code:
$twitterObj->post('/statuses/update.json', array('status' => $current_song));


mine looks like this

code:
$twitterObj->post('/statuses/update.json', array('status' => '#NowPlaying - ' .$song[1]. ' dubstep.fm/listen'));


which results in a tweet that looks like this

Quote:
#NowPlaying - ARCHIVE - 2008-10-26 - Dubfix Renegade Sessions With DopeLabs From Seattle http://dubstep.fm/listen
dopelabs is offline   Reply With Quote
Old 20th May 2014, 22:40   #303
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
ok thanks
IamJay is offline   Reply With Quote
Old 25th May 2014, 23:38   #304
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
IAM HAVEING THE SAME ISSUE AS IAMJAY ABOVE

Fatal error: Uncaught exception 'EpiTwitterForbiddenException' with message '{"errors":[{"code":170,"message":"Missing required parameter: status."}]}' in /home/ricofox/public_html/vlinkradio.com/twittercast/EpiTwitter.php:265 Stack trace: #0 /home/ricofox/public_html/vlinkradio.com/twittercast/EpiTwitter.php(226): EpiTwitterException::raise(Object(EpiCurlManager), false) #1 /home/ricofox/public_html/vlinkradio.com/twittercast/EpiTwitter.php(127): EpiTwitterJson->__get('response') #2 /home/ricofox/public_html/vlinkradio.com/twittercast/EpiTwitter.php(44): EpiTwitter->request('POST', '/statuses/updat...', Array) #3 /home/ricofox/public_html/vlinkradio.com/twittercast/shoutcast_v1.php(95): EpiTwitter->post('/statuses/updat...', Array) #4 {main} thrown in /home/ricofox/public_html/vlinkradio.com/twittercast/EpiTwitter.php on line 265
ricofox is offline   Reply With Quote
Old 26th May 2014, 02:26   #305
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
is it returning a title from the shoutcast server?

has the title changed?

can you show me examples of what your titles look like?
dopelabs is offline   Reply With Quote
Old 26th May 2014, 02:48   #306
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
is it returning a title from the shoutcast server?

has the title changed?

can you show me examples of what your titles look like?
no!
no!
VibesLink Radio
SANCHEZ - I care for you
ricofox is offline   Reply With Quote
Old 26th May 2014, 02:59   #307
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
I am having same issue with iamjay above how did you help him
ricofox is offline   Reply With Quote
Old 26th May 2014, 03:02   #308
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
so again.. i need to see the whole source code for shoutcast_v*.php or icecast.php
you can leave out your twitter credentials...
dopelabs is offline   Reply With Quote
Old 26th May 2014, 03:04   #309
DrO
 
Join Date: Sep 2003
Posts: 27,880
(not that it is) but it's good to know that community members get poor information back from other users as well when they are trying to help resolve issues no matter what it is (as was really starting to think it was something people had against me ).
DrO is offline   Reply With Quote
Old 26th May 2014, 03:19   #310
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
so again.. i need to see the whole source code for shoutcast_v*.php or icecast.php
you can leave out your twitter credentials...
<?php

include 'EpiCurl.php';
include 'EpiOAuth.php';
include 'EpiTwitter.php';

#Consumer key token
$consumer_key = '';

#Consumer secret token
$consumer_secret = '';

#Access Token
$token = '';

#Access Token Secret
$secret= '';

$refresh = "60"; // Page refresh time in seconds. Put 0 for no refresh. (only used if updating via browser)
$timeout = "5"; // Number of seconds before connecton times out.

$ip[1] = "174.123.174.50"; // IP address of shoutcast server
$port[1] = "8380"; // Port of shoutcast server

//END CONFIGURATION

$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $token, $secret);
$twitterObjUnAuth = new EpiTwitter($consumer_key, $consumer_secret);
$servers = count($ip);
$i = "1";
while($i<=$servers)
{
$fp = @fsockopen($ip[$i],$port[$i],$errno,$errstr,$timeout);
if (!$fp)
{
$listeners[$i] = "0";
$msg[$i] = "<span class=\"red\">ERROR [Connection refused / Server down]</span>";
$error[$i] = "1";
}
else
{
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($fp))
{
$info = fgets($fp);
}
$info = str_replace('<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>', "", $info);
$info = str_replace('</body></html>', "", $info);
$stats = explode(',', $info);
if (empty($stats[1]) )
{
$listeners[$i] = "0";
$msg[$i] = "<span class=\"red\">ERROR [There is no source connected]</span>";
$error[$i] = "1";
}
else
{
if ($stats[1] == "1")
{
$song[$i] = $stats[6];
$listeners[$i] = $stats[4];
$max[$i] = $stats[3];
$bitrate[$i] = $stats[5];
$peak[$i] = $stats[2];
if ($stats[0] == $max[$i])
{
$msg[$i] .= "<span class=\"red\">";
}
if ($stats[0] == $max[$i])
{
$msg[$i] .= "</span>";
}
}
else
{
$listeners[$i] = "0";
$msg[$i] = " <span class=\"red\">ERROR [Cannot get info from server]</span>";
$error[$i] = "1";
}
}
}
$i++;
}
$total_listeners = array_sum($listeners) ;

if ($refresh != "0")
{
print "<meta http-equiv=\"refresh\" content=\"$refresh\">\n";
}
print "<title>$song[1]</title>"; // sure in the title too
?>
<center>
<?php print "$song[1]"; // so you can see what the output looks like

$twitterObj->post('/statuses/update.json', array('status' => $song[1])); // Tweet that shit.

?>
</center>
ricofox is offline   Reply With Quote
Old 26th May 2014, 03:21   #311
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
there are many reasons why this script would fail. the majority is because most people are on shared hosting servers which do not allow methods used in this particular script...

that being said.. i have learned a bunch of scripting techniques in the past few weeks that has stemmed from sctrans2 and/or the source software im using not properly sending along the metadata/title updates.. so i have wrote a shell script to tail the log file, extract the title from any lines that match 'seq="1">' , match that against what the server is currently displaying, and push out the title update if its different, im also going to combine this with a few other scripts i have.. one that changes a redirect depending on if there is a live show or not, if its not a live show, domain/whatever.html will fwd to the download for that show, and if its a live show, links to the pls file... and the twittercast script. i plan on using all of these as script executions via the trans playlist file.

either way im happy to help anyone that needs it if i can.
dopelabs is offline   Reply With Quote
Old 26th May 2014, 03:31   #312
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
there are many reasons why this script would fail. the majority is because most people are on shared hosting servers which do not allow methods used in this particular script...

that being said.. i have learned a bunch of scripting techniques in the past few weeks that has stemmed from sctrans2 and/or the source software im using not properly sending along the metadata/title updates.. so i have wrote a shell script to tail the log file, extract the title from any lines that match 'seq="1">' , match that against what the server is currently displaying, and push out the title update if its different, im also going to combine this with a few other scripts i have.. one that changes a redirect depending on if there is a live show or not, if its not a live show, domain/whatever.html will fwd to the download for that show, and if its a live show, links to the pls file... and the twittercast script. i plan on using all of these as script executions via the trans playlist file.

either way im happy to help anyone that needs it if i can.
so how does this help me
ricofox is offline   Reply With Quote
Old 26th May 2014, 03:41   #313
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
it doesnt.. im working on your stuffright now...
dopelabs is offline   Reply With Quote
Old 26th May 2014, 03:43   #314
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
it doesnt.. im working on your stuffright now...
ok
ricofox is offline   Reply With Quote
Old 26th May 2014, 04:30   #315
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
1. Grabbed fresh copy of the code from
code:
github.com/dlnetworks/twittercast

2. Copied and pasted the shoutcast server details from your shoutcast_v1.php

Quote:
Originally Posted by ricofox View Post
$ip[1] = "174.123.174.50"; // IP address of shoutcast server
$port[1] = "8380"; // Port of shoutcast server
3. Copied and pasted in my personal twitter settings, saved.
4. Ran the following command on the command line.

code:
php /path/to/shoutcast_v1.php


or you can put the page in a web accessible directory and visit the page in any browser.


The song posted to my twitter account without any errors in my php config.





Here it is (from the end of configuration to end of file)

code:

//END CONFIGURATION
$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $token, $secret);
$twitterObjUnAuth = new EpiTwitter($consumer_key, $consumer_secret);

$servers = count($ip);
$i = "1";
while($i<=$servers)
{
$fp = @fsockopen($ip[$i],$port[$i],$errno,$errstr,$timeout);
if (!$fp)
{
$listeners[$i] = "0";
$msg[$i] = "<span class=\"red\">ERROR [Connection refused / Server down]</span>";
$error[$i] = "1";
}
else
{
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($fp))
{
$info = fgets($fp);
}
$info = str_replace('<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>', "", $info);
$info = str_replace('</body></html>', "", $info);
$stats = explode(',', $info);
if (empty($stats[1]) )
{
$listeners[$i] = "0";
$msg[$i] = "<span class=\"red\">ERROR [There is no source connected]</span>";
$error[$i] = "1";
}
else
{
if ($stats[1] == "1")
{
$song[$i] = $stats[6];
$listeners[$i] = $stats[4];
$max[$i] = $stats[3];
if ($stats[0] == $max[$i])
{
$msg[$i] .= "<span class=\"red\">";
}
if ($stats[0] == $max[$i])
{
$msg[$i] .= "</span>";
}
}
else
{
$listeners[$i] = "0";
$msg[$i] = " <span class=\"red\">ERROR [Cannot get info from server]</span>";
$error[$i] = "1";
}
}
}
$i++;
}

print "$song[1]"; // so you can see what the output looks like

$twitterObj->post('/statuses/update.json', array('status' => $song[1])); // Tweet that shit.

?>

dopelabs is offline   Reply With Quote
Old 26th May 2014, 04:49   #316
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
i got no change
ricofox is offline   Reply With Quote
Old 26th May 2014, 04:51   #317
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
my php info

System Linux langur.arvixe.com 2.6.32-531.11.2.lve1.2.55.el6.x86_64 #1 SMP Fri Apr 18 09:06:31 EDT 2014 x86_64
Build Date May 7 2014 21:57:31
Configure Command './configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=/usr' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-sqlite=shared' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/lib
Loaded Configuration File /usr/local/lib/php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,NTS
PHP Extension Build API20090626,NTS
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
Zend Multibyte Support enabled
IPv6 Support enabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip, rar
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
ricofox is offline   Reply With Quote
Old 26th May 2014, 07:24   #318
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 496
Send a message via AIM to dopelabs
who is your hosting provider? sometimes they will block outbound ports except common ones such as 80, 21, 22, 25 , etc....
dopelabs is offline   Reply With Quote
Old 26th May 2014, 11:05   #319
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
who is your hosting provider? sometimes they will block outbound ports except common ones such as 80, 21, 22, 25 , etc....
arixe.com
ricofox is offline   Reply With Quote
Old 26th May 2014, 12:06   #320
DJ-Garybaldy
Senior Member
 
DJ-Garybaldy's Avatar
 
Join Date: Sep 2003
Location: Manchester UK
Posts: 416
Quote:
Originally Posted by ricofox View Post
arixe.com
That link that says that domain is up for sale.

Looks like you might want to get another webhost that will allow you to run the Twitter script.



Proud user of RadioDJ FREE shoutcast automation software

Online: Twitter - Facebook - Mixcloud
DJ-Garybaldy is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump