Okay, the reply to my problem and the email response from Netfirms seemed to dovetail together, but the error message I got was NOT due to any problem with OAuth on my host's part.

My account was still set to use PHP4 instead of PHP5, which this script apparently requires. I read something about this somewhere, changed my preferences on Netfirms to PHP5 and hit the twitter.php page again. I got the title that was playing and number of listeners instead of the error that had been coming up before.

[I can't say that I entirely trust Netfirms' tech support. When I tried to set the old version of Twittercast up the first time, they told my that I couldn't do the script that would update the title on my site, which I did get to work--after much frustration--a few days later.]

So let's go at it again. The title and listeners page (twitter.php) is working, I'm getting no errors, but I get no updates on Twitter. Is there someplace where I might find an error indicated that I can work with, or can anyone think of something I might try to get some substantial result I can work with out of this? I really thank you for your help. I guess I'm not giving up on this until I actually understand this whole OAuth.php thing.

Directions:
1. Register a new app at http://dev.twitter.com/apps/new
2. Fill in tokens in twitter.php (ALL needed tokens are available on the site where you registered your app. Just look really hard for them if you have trouble finding them!)
3. Upload twitter.php, EpiCurl.php, EpiOAuth.php, and EpiTwitter.php to your webserver IN THE SAME FOLDER!
4. TEST IT! Go to http://www.example.com/whateverfolde...essage=TESTING ... make sure that a tweet was posted to your Twitter feed!

If the test works, add twitter.pal to SAM:
5. Change URL in twitter.pal where indicated. SAVE!
6. Start the PAL script. If all is well, your artist/song title will update automatically to your Twitter feed.

Use of this script at your own risk (although I personally use it, so all should be well).

Quote:

Originally Posted by Mamutdiego

I'm having trouble setting up, where I find the Access Token Secret?
Please help setting up a twittercast. Thanks

MAN..this script is awesome...got it to work perfectly on the first try but i was just wondering is there a way that it wont post like a given keyword?..i got songs in rotation right now that say "unknown" and i dont want those to post at all on twitter..I seen the post about "live" and posting songs WITH a keyword but how about skipping songs with a keyword ..

ok i updated my whole playlist and all song info is there but while going thru it i started to wonder if it was possible for that keyword feature mentioned earlier to post all the songs with an '@' symbol. on alot of songs i tag the artist on twitter in the song title so I was just wondering if the song info has @sample name it would find just '@' cuz all names are different..

I’ve tested many already created hosting sites where you can grab stats from your stream and auto tweet it and they don’t turn out to work as well.

I’ve considered writing my own code as I’m a PHP developer myself, but since theirs tools already out their; I figure I’ll try and see if there was some sort of already created solution out there. Thus bringing me too this forum thread and decided to give this “twitter script” a shot.

After 5 minutes of downloading, creating twitter application, getting APIs and tokens, updating configuration, setting file permissions and tested via browser. It does it work!  After browser test I’ve moved to using a cron job – and still works.

Thus be the reason I’m posting now, I’ve noticed a few people have struggled getting this to work and I’ve tested this on CentOS with cPanel running Apache.

The following details that says “MediaOnAir” represents my company name – and I used for this test, please use your own radio station name when creating your application for twitter. Keep in mind – where ever you want your song displayed on your twitter account you MUST log into that account to create an application.

After you submit your application will automatically be created and you have API keys instantly.

Now we’re going to update the twitter.php file, open twitter.php in your favorite editor, if you don’t have one you can open in notepad.

I’ve labeled above where each key goes where based on the variable presented in the twitter.php.

After you fill in those details – you will notice a ‘red box’ that points to ‘Click here’ this is your access token which is required.

Again, I’ve labled where each token goes where in the twitter.php file.

Now we need to update the radio settings to get the information, change these settings to your host and port.

code:$ip[1] = "123.123.123.123";
$port[1] = "8000";

If you have more than one stream than you need to do the same for the other ports. You can add by copy and pasting and changing to the next number.

code:$ip[4] = "123.123.123.123";
$port[4] = "8000";

Or just remove all but 1.

After completed, save twitter.php – name the folder whatever you like and upload to your document root directory for it to be web accessiable, As mentioned earlier, I run cPanel therefore my doc root would be public_html – and I named my folder ‘twitter’ and uploaded it with all files inside.

If you right-click on title.txt in your FTP client (I use FileZilla) goto properties or could also be permissions if you’re using a different client – You need to set these permissions to 777 – make sure all boxes are checked or you can just type 777 in the input field. Again, I use cPanel chmod can also be done via the file manager.

After this, we can now being testing via the browser.

Web Test 1:

Success! – Does it post to twitter?

Twitter Test 1:

Success – Let’s try this again after browser refresh.

Web Test 2:

Success – Does it post to twitter?

Twitter Test 2:

Success! – Now let’s add cron job.

First, we need to add the cron job, most control panels support this as I use cPanel it does and even makes it easy for you. If you don’t use cPanel – ask your host if you’re unsure about adding cron jobs. All configurations will be more less the same.

Login cPanel – and go to Cron Jobs.

In cPanel theirs a dropdown box, Select ‘Common Settings: Every minute (*****) I’ve tested this to make sure it doesn’t double post or anything and it don’t.

You need to chage the command to use your own domain name;
Most people copy and paste ***** in the command line, do not do this! – Copy from wget as shown above.

Add New Cron Job; Close Browser and Let’s Test!

Shoutcast DNAS Test:

Twitter Test 3:

After a few minutes it’s posted for a few songs.

You can alter data if you know how to display your website or remove item’s – If you notice I’ve removed the listeners and added a website url. If you don’t know PHP than I don’t recommend updating this, if you want a certain way to be display ask here and I’m sure me or others will be willing to help.

Lastly, 7.html has been deprecated in Shoutcast V2 – therefore it will not work – but theirs already scripts out there that support logging into Shoutcast and grabbing the XML data to display the song data, I’ll possibly update this to get this working.

I've just moved my script to my new host and I get this error message when i run the script.

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/mysite/public_html/twitter/EpiOAuth.php on line 158

I've just moved my script to my new host and I get this error message when i run the script.

Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/mysite/public_html/twitter/EpiOAuth.php on line 158

anyone any pointers?

ask your hosting provider.. they should be able to change your php settings for you to allow

I’ve tested many already created hosting sites where you can grab stats from your stream and auto tweet it and they don’t turn out to work as well.

I’ve considered writing my own code as I’m a PHP developer myself, but since theirs tools already out their; I figure I’ll try and see if there was some sort of already created solution out there. Thus bringing me too this forum thread and decided to give this “twitter script” a shot.

After 5 minutes of downloading, creating twitter application, getting APIs and tokens, updating configuration, setting file permissions and tested via browser. It does it work!  After browser test I’ve moved to using a cron job – and still works.

Thus be the reason I’m posting now, I’ve noticed a few people have struggled getting this to work and I’ve tested this on CentOS with cPanel running Apache.

thanks for taking the time to write this up... i know my instructions are a bit on the techy side =]