Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast Discussions

Reply
Thread Tools Search this Thread Display Modes
Old 29th April 2015, 01:45   #401
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
complete instructions are included in this thread and on the github page.

https://github.com/dlnetworks/twittercast
dopelabs is offline   Reply With Quote
Old 29th April 2015, 06:10   #402
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Okay, I know nothing about writing code, so can someone please explain what is meant by this: Upload all files to your webserver in a web accessible directory?

Can someone please break this process down for someone that has no understanding of reading or writing source code, because telling me to download the files and follow the instructions is not working for me because I don't understand what they mean.
wdepradio is offline   Reply With Quote
Old 29th April 2015, 07:45   #403
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
this script requires one to have basic knowledge of web hosting and website design. also the ability to set up a developer account for api access on twitter.

if you do not know these basic things i also provide twittercast as a service. private msg for more details
dopelabs is offline   Reply With Quote
Old 29th April 2015, 07:54   #404
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
I have set up the developer api. I would like to think I have a basic knowledge, but I think you are referring to more than just having a website that is run off of the wordpress.org platform and installing wordpress plugins.
wdepradio is offline   Reply With Quote
Old 29th April 2015, 08:09   #405
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
you would need to use an FTP client or SCP client to access your web server. this allows you to upload and download files. your web host provider (the company you pay money to have a website) should have provided you with a username and password when you created the account.

edit shoutcast_v1.php or shoutcast_v2.php or icecast.php and fill in the api information respectively.

upload the all the files to your website. i suggest in its own directory so you can go to website.com/directory or you can put in the same directory as the index so you would go to website.com/shoutcast_v1.php

make sure the file permissions are executable (or 755)

visit the script in the browser.
dopelabs is offline   Reply With Quote
Old 29th April 2015, 10:56   #406
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Okay so I am in my FTP and I created a folder. So before I do anything else I want to make sure that what I do is correct. Now I need to unzip the Twittercast zip file, then upload it through my FTP and then edit the php files correct?
wdepradio is offline   Reply With Quote
Old 29th April 2015, 11:04   #407
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
yes.. you only need to edit one file. choose the appropriately named file for the type of server your using.

once you have made the changes, set the file permissions for the file (or whole directory). all files need to be readable and executable by user, group, and world. (755).

just curious.. what hosting company are you using?
dopelabs is offline   Reply With Quote
Old 29th April 2015, 13:24   #408
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
I'm using Godaddy. I think I'm using Shoutcast v1.
wdepradio is offline   Reply With Quote
Old 29th April 2015, 13:26   #409
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
i am pretty sure that godaddy does NOT allow outbound access to ports other than the standard web ports (80,443,etc)
dopelabs is offline   Reply With Quote
Old 29th April 2015, 21:17   #410
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Okay, I've contacted Godaddy and they said that they allow outbound access on port 755.
I have tried to edit the php file correctly and want to know if this ic correct before I upload it. So here is my script:

<?php

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

#Consumer key token
$consumer_key = 'VRDMFs888rl0Wk7EJiO8GQn4X';

#Consumer secret token
$consumer_secret = 'xi';

#Access Token
$token = 'x';

#Access Token Secret
$secret= 'x';

$refresh = "120"; // 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.7.77.178"; // IP address of shoutcast server
$port[1] = "8134"; // 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.

?>

Last edited by wdepradio; 29th April 2015 at 22:48.
wdepradio is offline   Reply With Quote
Old 29th April 2015, 22:09   #411
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
now you need to go and Change your passwords and regenerate a new api key. DONT POST PASSWORDS AND ANYTHING THAT SAYS SECRET!!'
dopelabs is offline   Reply With Quote
Old 29th April 2015, 22:13   #412
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
and no it will not work because your server is on port 8134 and godaddy only allows outbound on port 755. also viewing on my phone it looks like you have the consumer secret on a new line, which will most likely not work. everything else looks ok. but it's all a moot point because go daddy won't open the ports you need
dopelabs is offline   Reply With Quote
Old 29th April 2015, 22:49   #413
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
The port is what I have from Shoutcast. Also, I don't have it on another line that is what shows with that font size
wdepradio is offline   Reply With Quote
Old 30th April 2015, 01:01   #414
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
your config shows that your shoutcast server is on port 8134

code:
$port[1] = "8134"; // Port of shoutcast server


Quote:
Originally Posted by wdepradio View Post
Okay, I've contacted Godaddy and they said that they allow outbound access on port 755.
as you can see.. these are not the same port numbers.

im not sure where or why exactly they are allowing access on port 755.. thats just an odd port number... (lets just hope you didnt mistake the file permissions setting number (755) i mentioned earlier for a port number) =]
the best thing you can do is to provide a copy of the script to godaddy and ask them if they support this script (including outbound access over port 8134)
dopelabs is offline   Reply With Quote
Old 30th April 2015, 02:41   #415
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Well I posted the code to my server and nothing is happening, not sure what else I am supposed to do.
wdepradio is offline   Reply With Quote
Old 30th April 2015, 04:38   #416
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Yes, I mentioned port 755 to them because you put it in your response. I did tell you that I know nothing about scripting and since you kept saying something about ports I thought you meant meant 755 was the port that I had to give Godaddy and not the port for my stream, you weren't clear on your meaning.
wdepradio is offline   Reply With Quote
Old 30th April 2015, 06:03   #417
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
sigh... alright give me a little bit and http://www.twittercast.net
dopelabs is offline   Reply With Quote
Old 30th April 2015, 16:03   #418
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Quote:
Originally Posted by dopelabs View Post
sigh... alright give me a little bit and http://www.twittercast.net
This comes back with a blank page for me
wdepradio is offline   Reply With Quote
Old 30th April 2015, 17:23   #419
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
I recently registered the domain so just try again until it works. DNS can take time to propagate
dopelabs is offline   Reply With Quote
Old 2nd May 2015, 04:33   #420
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Okay, I just got off the phone with Godaddy and they said that they don't block any outbound ports and they helped me put all of the php files in the correct spot, but I still am not seeing any updates on my Twitter.
wdepradio is offline   Reply With Quote
Old 2nd May 2015, 08:08   #421
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
do they allow php-curl?

is your twitter app have read and write permissions?

godaddy should have a way for you to access the raw log files generated by the webserver
your looking for the access log and the error logs. each line in the llogfile is timestamped. access the php script, look at what time it is, download a fresh copy of the access and error logfiles, open error log and scroll to find the time and read.. if there is an error, it will be in there. do the same for the access log.
dopelabs is offline   Reply With Quote
Old 2nd May 2015, 08:31   #422
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
You know this would be so much easier if we had a way to chat in real time or possibly have this conversation over the phone. I'm just saying, because when I talked to Godaddy they tell me that everything is okay on their end, then I get a message from you a few hours later and then you prompt me to go call them again and ask them a question then they refer me back to you. There has got to be am easier way to do this.
wdepradio is offline   Reply With Quote
Old 2nd May 2015, 08:36   #423
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
there is.. and im working on that right now... all you will need to do is register an account on twittercast.net enter in your twitter information and your server details, set an interval time and save.

if you want to chat in real time http://chat.dopelabs.com
dopelabs is offline   Reply With Quote
Old 5th May 2015, 11:44   #424
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
almost done... http://www.twittercast.net
dopelabs is offline   Reply With Quote
Old 6th May 2015, 19:01   #425
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
beta testing in effect.. sign up at http://www.twittercast.net
dopelabs is offline   Reply With Quote
Old 7th May 2015, 21:50   #426
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
I signed up for the site but am stuck on this screen http://www.twittercast.net/wp-login.php
wdepradio is offline   Reply With Quote
Old 7th May 2015, 22:35   #427
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
new user accounts need to be approved by an admin (me) during beta testing.

I approved your account earlier today. please refer to the approval email you should have received for the auth code needed to login.
dopelabs is offline   Reply With Quote
Old 7th May 2015, 23:55   #428
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Yeah I got the email about 15 minutes after I posted this. I filled in all of the requested information but still am not getting any twitter updates. I know you said this was beta testing, so I thought you would like to know.
wdepradio is offline   Reply With Quote
Old 8th May 2015, 02:10   #429
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
I will check what's up when I take my lunch in about an hour
dopelabs is offline   Reply With Quote
Old 8th May 2015, 02:21   #430
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
made a quick change. let me know if it's still not posting
dopelabs is offline   Reply With Quote
Old 8th May 2015, 05:16   #431
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
I am still not seeing any posts to my twitter
Is there anything special that I should have in the Twitter Prefix and Twitter Suffix fields?
wdepradio is offline   Reply With Quote
Old 8th May 2015, 09:36   #432
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
its posting now. though you must have it set to a different twitter account than /wdepradio because i dont see any title updates there
dopelabs is offline   Reply With Quote
Old 10th May 2015, 04:19   #433
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Hello, I just registered for my other twitter account so that the updates can post to the WDEP Radio Twitter account, just awaiting my approval code
wdepradio is offline   Reply With Quote
Old 10th May 2015, 04:22   #434
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
approved
dopelabs is offline   Reply With Quote
Old 10th May 2015, 04:32   #435
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Cool beans, just waiting on my confirmation email.
wdepradio is offline   Reply With Quote
Old 10th May 2015, 06:45   #436
wdepradio
Junior Member
 
Join Date: Apr 2015
Posts: 20
Hello can you approve editor@wdepmag.com for a twittercast account?
wdepradio is offline   Reply With Quote
Old 12th June 2015, 06:08   #437
zumer
Junior Member
 
Join Date: Jan 2014
Posts: 9
I propose to change the original string

$stats = explode(',', $info);

on

$stats = explode(',', $info, 7);

if the song contains a comma, it was not cut and the full.
zumer is offline   Reply With Quote
Old 20th June 2015, 15:33   #438
kjones9999
Junior Member
 
Join Date: Sep 2011
Posts: 5
Quote:
Originally Posted by dopelabs View Post
complete instructions are included in this thread and on the github page.

https://github.com/dlnetworks/twittercast
Just wanted to say thanks for developing this. Works beautifully. Thanks also for your generous giving of time to support others who are having issues.
kjones9999 is offline   Reply With Quote
Old 27th June 2015, 14:21   #439
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 520
Send a message via AIM to dopelabs
no problem =]

i went ahead and slapped something together (twittercast.net) to make it easier for the less technically savvy.

next is an autodj site/service that sources soundcloud for the playback media. (scstream.com)
dopelabs is offline   Reply With Quote
Old 29th June 2015, 15:47   #440
FMCIEN
Junior Member
 
Join Date: Apr 2009
Location: Argntina
Posts: 3
customize?

The scrip work fine to me at https://twitter.com/Streaming_Arg but I like the twitt show:
"Now play at xxxxxxxx: Galantis - Runaway" (example) or similar.
Can add some customized txt at this great script to show?

Tnks... Bes regards!
FMCIEN 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