Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Discussions

Reply
Thread Tools Search this Thread Display Modes
Old 26th May 2014, 11:07   #321
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by garybaldy72uk View Post
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.
www.arvixe.com
ricofox is offline   Reply With Quote
Old 26th May 2014, 11:10   #322
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
well there you go.. first thing i see in big huge letters is 'shared hosting'..

you will most likely not be able to use this script on a shared hosting server.

to confirm this you can show the source code to your hosting support and ask them if they support it
dopelabs is offline   Reply With Quote
Old 26th May 2014, 11:13   #323
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
well there you go.. first thing i see in big huge letters is 'shared hosting'..

you will most likely not be able to use this script on a shared hosting server.

to confirm this you can show the source code to your hosting support and ask them if they support it
are any other way i can get a host for it that wont cost me ?
ricofox is offline   Reply With Quote
Old 26th May 2014, 11:34   #324
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
that all really depends.. and depends on when its failing.. if you get nothing back in the browser, its most likely blocking outbound attempts... ports in the 8000 range are usually known to be shoutcast related.. if you want you can try using the url to a server thats running on a different port.. sometimes 8080 is a common http service port they might not block. and i would be pretty confident that they wouldnt block connections on port 80 (standard web port)

if you want you can test against one of my streams running on port 80. you can use stream.dubstep.fm:80...

otherwise, you get what you pay for... these days its becoming more and more important to have these types of flexibilities in a hosting provider since technology and web based services are growing super fast...
dopelabs is offline   Reply With Quote
Old 26th May 2014, 19:46   #325
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
that all really depends.. and depends on when its failing.. if you get nothing back in the browser, its most likely blocking outbound attempts... ports in the 8000 range are usually known to be shoutcast related.. if you want you can try using the url to a server thats running on a different port.. sometimes 8080 is a common http service port they might not block. and i would be pretty confident that they wouldnt block connections on port 80 (standard web port)

if you want you can test against one of my streams running on port 80. you can use stream.dubstep.fm:80...

otherwise, you get what you pay for... these days its becoming more and more important to have these types of flexibilities in a hosting provider since technology and web based services are growing super fast...
what should i ask my host provider
ricofox is offline   Reply With Quote
Old 26th May 2014, 19:54   #326
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
show them the script, and any recent entries in your error log, and if you want you can link to them to my github. treat it like any other support request...

this should work on a default apache/php install...

but you will never find a shared hosting provider serving with default configurations.....

if you get no title in the browser, you can explain to them that its having problems connecting to the shoutcast server...
dopelabs is offline   Reply With Quote
Old 26th May 2014, 20:25   #327
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
2009-01-24 - The Yongstellations Renagade From So Cal - Dubstep.fm
Fatal error: Uncaught exception 'EpiTwitterForbiddenException' with message '{"errors":[{"code":187,"message":"Status is a duplicate."}]}' in /home/ricofox/public_html/vlinkradio.com/twitter/EpiTwitter.php:265 Stack trace: #0 /home/ricofox/public_html/vlinkradio.com/twitter/EpiTwitter.php(226): EpiTwitterException::raise(Object(EpiCurlManager), false) #1 /home/ricofox/public_html/vlinkradio.com/twitter/EpiTwitter.php(127): EpiTwitterJson->__get('response') #2 /home/ricofox/public_html/vlinkradio.com/twitter/EpiTwitter.php(44): EpiTwitter->request('POST', '/statuses/updat...', Array) #3 /home/ricofox/public_html/vlinkradio.com/twitter/shoutcast_v1.php(85): EpiTwitter->post('/statuses/updat...', Array) #4 {main} thrown in /home/ricofox/public_html/vlinkradio.com/twitter/EpiTwitter.php on line 265

i get that wen i put in your stream
ricofox is offline   Reply With Quote
Old 26th May 2014, 21:55   #328
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
it is working then... look at the error message
{"errors":[{"code":187,"message":"Status is a duplicate."}]}'


twitter will not repost the same thing 2 times in a row.
dopelabs is offline   Reply With Quote
Old 27th May 2014, 02:08   #329
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
it is working then... Look at the error message
{"errors":[{"code":187,"message":"status is a duplicate."}]}'


twitter will not repost the same thing 2 times in a row.
the problem is with my shout cast port i think i tried some other stream with port:8000 and it work fine on a different host
ricofox is offline   Reply With Quote
Old 27th May 2014, 02:51   #330
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
your shoutcast port is fine. your host is blocking outbound connections on those ports is more likely. sometimes, depending on the provider, you may request the ports to be open for in/out bound traffic. if this is the case, and you are allowed, its generally a good idea to also open port+1, ie if your port is 8000, also request 8001.
dopelabs is offline   Reply With Quote
Old 27th May 2014, 03:09   #331
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
how did you make stream stream.dubstep.fm
ricofox is offline   Reply With Quote
Old 27th May 2014, 03:37   #332
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
stream.dubstep.fm is just a DNS A record entry that resolves to an ip address... in this case, resolves to the IP address of a shoutcast server. and also because its running on port 80 (the default port for websites) theres no need to append :80

you need root or sudo privileges to run any service on low port numbers


if you own a domain you have control over the 'vhosts' or 'subdomains' you can add.
dopelabs is offline   Reply With Quote
Old 27th May 2014, 18:59   #333
ricofox
Junior Member
 
Join Date: May 2014
Posts: 16
Quote:
Originally Posted by dopelabs View Post
stream.dubstep.fm is just a DNS A record entry that resolves to an ip address... in this case, resolves to the IP address of a shoutcast server. and also because its running on port 80 (the default port for websites) theres no need to append :80

you need root or sudo privileges to run any service on low port numbers


if you own a domain you have control over the 'vhosts' or 'subdomains' you can add.
how my port work on your host but not mine
ricofox is offline   Reply With Quote
Old 27th May 2014, 23:15   #334
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
your web host is a different server than your shoutcast host. your web host is blocking port ranges that your shoutcast server runs on. MY shoutcast server is on port 80. i highly doubt a webhost on a shared server would block outbound port 80 because all websites run on port 80 (which is why i run mine on port 80, firewall passage)

the website or server where the twittercast php scripts are hosted is the host that will initiate the request to the shoutcast server, not you(the browser/client)...

your shoutcast server will show the ip address, and user agent of your webhost or server in its log files. not yours.

your webhost is a SHARED host.. so its easier for them to just lock down all ports except common ones like 50,25,53,110,443, etc (basically all the ones under 1024)
dopelabs is offline   Reply With Quote
Old 29th May 2014, 01:02   #335
OhSnapFM
Junior Member
 
Join Date: May 2014
Posts: 3
Quote:
Originally Posted by dopelabs View Post
your web host is a different server than your shoutcast host. your web host is blocking port ranges that your shoutcast server runs on. MY shoutcast server is on port 80. i highly doubt a webhost on a shared server would block outbound port 80 because all websites run on port 80 (which is why i run mine on port 80, firewall passage)

the website or server where the twittercast php scripts are hosted is the host that will initiate the request to the shoutcast server, not you(the browser/client)...

your shoutcast server will show the ip address, and user agent of your webhost or server in its log files. not yours.

your webhost is a SHARED host.. so its easier for them to just lock down all ports except common ones like 50,25,53,110,443, etc (basically all the ones under 1024)
I would like to add that even with some dedicated servers that are managed the company will block specific ports.

So just like you said, its best to ask the host if the port is blocked, and to unblock it (and give the reason why as well)
OhSnapFM is offline   Reply With Quote
Old 29th May 2014, 01:18   #336
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
yea the key word there is 'managed'.... if you have an unmanaged, dedicated server at a hosting facility somewhere that blocks outbound ports by default, time to get a new hosting provider
dopelabs is offline   Reply With Quote
Old 2nd June 2014, 18:08   #337
twitterautopost
Junior Member
 
Join Date: Jun 2014
Posts: 9
Blatant plug I know, but if anyone needs it, we're offering this as a paid-for service... WE'll do all the setup and config. PM for details...
twitterautopost is offline   Reply With Quote
Old 2nd June 2014, 18:19   #338
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
wow really... stay classy there buddy.. just for that... ill do it for less than whatever ^^^ that guy is charging...
dopelabs is offline   Reply With Quote
Old 2nd June 2014, 19:18   #339
twitterautopost
Junior Member
 
Join Date: Jun 2014
Posts: 9
I know, I know...
twitterautopost is offline   Reply With Quote
Old 6th June 2014, 15:03   #340
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
i switched vps but on the one that i'm hosting the twittercast now everything is not posted.. my cron job is set to 1 minute but not every song is being posted to twitter on this vps help
IamJay is offline   Reply With Quote
Old 6th June 2014, 17:22   #341
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
im not sure what your saying here... is it posting or is it not posting?

can you see the song title in the browser when you visit the php page?

are your song titles + any extra text = 140 characters or less? (i think thats still the limit)
dopelabs is offline   Reply With Quote
Old 6th June 2014, 23:11   #342
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
it posts and no i don't have extra characters, my cron job is set to run every minute, when i have a dj on and looks at the twitter posting not every song posts even when i go on the php page... and refresh for the songs to post as they are changed they don't
IamJay is offline   Reply With Quote
Old 23rd July 2014, 04:51   #343
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
it posts.. cool glad to see you sorted this out =]

i will be updating this very soon to take use of better writing practices learned in time past...

but for now heres this if anyone was curious..


Customized output examples:

V1:
code:

$twitterObj->post('/statuses/update.json', array('status' => '#tag '.$song[1].' http://url.com #notagbacks'));



V2:
code:

$twitterObj->post('/statuses/update.json', array('status' => '#tag '.$current_song.' http://url.com #notagbacks'));



Iceacst:
code:

$twitterObj->post('/statuses/update.json', array('status' => '#tag '.$data[artist].' - '.$data[track].' http://url.com #notagbacks'));

dopelabs is offline   Reply With Quote
Old 6th August 2014, 23:50   #344
dietradio
Junior Member
 
Join Date: Aug 2014
Posts: 2
Hi dllabs,
I'm trying to get this working but getting the following ERROR:

I'm getting:
[Wed Aug 06 19:35:51 2014] [error] [client 8.30.100.123] PHP Fatal error: Uncaught exception 'EpiTwitterNotAuthorizedException' with message '{"request":"\\/1.1\\/statuses\\/update.json","error":"Read-only application cannot POST."}' in /var/www/html/EpiTwitter.php:263\nStack trace:\n#0 /var/www/html/EpiTwitter.php(226): EpiTwitterException::raise(Object(EpiCurlManager), false)\n#1 /var/www/html/EpiTwitter.php(127): EpiTwitterJson->__get('response')\n#2 /var/www/html/EpiTwitter.php(44): EpiTwitter->request('POST', '/statuses/updat...', Array)\n#3 /var/www/html/shoutcast_v2.php(109): EpiTwitter->post('/statuses/updat...', Array)\n#4 {main}\n thrown in /var/www/html/EpiTwitter.php on line 263, referer: http://107.170.14.142/shoutcast_v2.php

here's my configuration: http://pastebin.com/UY6YKErm

I'm running on a Centos VPS. And I have the permissions set correctly in via Twitter.
dietradio is offline   Reply With Quote
Old 7th August 2014, 01:01   #345
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
your app need to be set to read and write..

please look closely at any error msgs returned.

message '{"request":"\\/1.1\\/statuses\\/update.json","error":"Read-only application cannot POST."}'
dopelabs is offline   Reply With Quote
Old 7th August 2014, 19:00   #346
dietradio
Junior Member
 
Join Date: Aug 2014
Posts: 2
That's the thing I do have permissions set to read/write in via twitter developer but I still get this response.

Is that the only reason this could be occurring?
dietradio is offline   Reply With Quote
Old 7th August 2014, 19:46   #347
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
did you also go to the API keys tab on dev.twitter and re-generate your keys and access tokens? (make sure you update your twittercast script with the new details as well)
dopelabs is offline   Reply With Quote
Old 17th August 2014, 18:25   #348
tradingoffice
Junior Member
 
Join Date: Aug 2014
Posts: 3
Error with shoutcast v1 php

Quote:
Originally Posted by IamJay View Post
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

i get the same error, my server has to have the the IP and port number together to display status. http://50.22.219.37:23730/
is my port blocked too?
tradingoffice is offline   Reply With Quote
Old 17th August 2014, 18:28   #349
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
please show me any changes you have made.
dopelabs is offline   Reply With Quote
Old 17th August 2014, 20:48   #350
tradingoffice
Junior Member
 
Join Date: Aug 2014
Posts: 3
shoutcast php take II

Quote:
Originally Posted by IamJay View Post
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
Quote:
Originally Posted by dopelabs View Post
please show me any changes you have made.
Did not make any changes here is my shoutcast php code. Thx


<?php

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

#Consumer key token
$consumer_key = 'XXXXX';

#Consumer secret token
$consumer_secret = 'XXXXX';

#Access Token
$token = 'XXXXXXX';

#Access Token Secret
$secret= 'XXXXXX';

$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] = "50.22.219.37"; // IP address of shoutcast server
$port[1] = "23730"; // 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];
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.

?>
tradingoffice is offline   Reply With Quote
Old 17th August 2014, 21:25   #351
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
do you see a song title if you view the script in your browser?
dopelabs is offline   Reply With Quote
Old 17th August 2014, 21:28   #352
tradingoffice
Junior Member
 
Join Date: Aug 2014
Posts: 3
Nah ... i get the error message IamJay go
tradingoffice is offline   Reply With Quote
Old 17th August 2014, 22:55   #353
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
does your web host meet all the requirements to run this script? if its not displaying the song title in the browser that means its failing before it even tries to post the tweet.

things you should inquire your hosting provider... if your port is being blocked by your provider. many shared hosting providers will firewall outbound connection attempts to anything other than the standard web services ports (80, 8080, 53, mail etc)

make sure your running the latest from https://github.com/dlnetworks/twittercast
dopelabs is offline   Reply With Quote
Old 30th August 2014, 03:50   #354
EdCowan
Junior Member
 
Join Date: Aug 2014
Posts: 2
Hello, i installed this script, the first two times i tried it... it posted the custom info to twitter but not the shoutcast info, after the second time i tried it now i only get a 500 internal server error when i go to that file, my site still works only will not let me access that file

in my cgi error log this is what i found to be causing the 500 server error
20140830T013318: timelessradio.net/twittercast/shoutcast_v1.php
PHP Fatal error: Uncaught exception 'EpiTwitterForbiddenException' with message '{"errors":[{"code":187,"message":"Status is a duplicate."}]}' in /hermes/bosnaweb05a/b2914/ipw.crazynex/public_html/twittercast/EpiTwitter.php:265
Stack trace:
#0 /hermes/bosnaweb05a/b2914/ipw.crazynex/public_html/twittercast/EpiTwitter.php(226): EpiTwitterException::raise(Object(EpiCurlManager), false)
#1 /hermes/bosnaweb05a/b2914/ipw.crazynex/public_html/twittercast/EpiTwitter.php(127): EpiTwitterJson->__get('response')
#2 /
EdCowan is offline   Reply With Quote
Old 30th August 2014, 19:37   #355
EdCowan
Junior Member
 
Join Date: Aug 2014
Posts: 2
i see that the error is caused because it is duplicate post info to twitter because the shoutcast info is not pulling, but what am i doing wrong for it not to pull the song info from shoutcast
EdCowan is offline   Reply With Quote
Old 3rd September 2014, 04:16   #356
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
i would need to see the source code for the config (top) of the file... also a few questions...

is this shared web hosting?
does your web host block outbound ports?
what does
code:
http://radioiport/7.html
show?
dopelabs is offline   Reply With Quote
Old 3rd March 2015, 17:02   #357
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
Any new update? i have an issue my tweets are sent once in few hours but my cron job is set to check every minute
IamJay is offline   Reply With Quote
Old 7th March 2015, 08:01   #358
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
and how often does the track title change? can i see your crontab settings?
dopelabs is offline   Reply With Quote
Old 7th March 2015, 11:55   #359
IamJay
Junior Member
 
Join Date: Mar 2014
Posts: 21
when i have auto dj on it take like 45min when a dj playing it takes like a minute for a track to change

IamJay is offline   Reply With Quote
Old 7th March 2015, 12:11   #360
dopelabs
Senior Member
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 489
Send a message via AIM to dopelabs
and the length of the tracks when autodj is on? also might want to check any error logs on the webserver... apache/php, or if you get emails with the cron results, etc might be worth a look.
dopelabs 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