View Single Post
  #48  
Old 09-25-2005, 02:53 PM
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Posts: 2,125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

all looks correct

I have had another person have problems and here is what they did....


Isn't it a bummer when you find you cant use a good script cause your hosting provider is blocking outgoing an all non descript ports and your website is not on the same server as something like a shoutcast stream.

Dont let that stop you if an xml file is behind a port that you cant access from your site try something like this mod I did for this shoutcast hack

Extra requirements: LyNX browser on your shoutcast server - this is a command line browser, if your on a shoutcast shell you would normally find it allready is installed
If you have your own dedicated server for streaming its not hard to install if it isnt allready there

usage here lynx = starts the browser
-auth= to get into protected directories/files
-source will drop the content source to stdout
1> filename will trap the stdout to a file

lynx then just drops straigh back to command line ready for the next command as you added the switches for its job
eg:
Code:
lynx -auth=admin:dNASpasshere -source http://dNAS-IP-Or-Domain:port/admin.cgi?mode=viewxml 1> /webserver/path/public_html/filename.xml
to automate this just add a crontrab entry, dont do this till you are satisfied you have it right

How to install so you can grab your shoutcast status from a permitted port 80:

You will need the files from the hack and a simple edit.

Find:
PHP Code:
// ######################## CONFIGURATION AREA ############################

$scdef "Shoutcast";   // Default station name
$scip "0.0.0.0";   // ip or url of shoutcast server
$scport "8000";        // port of shoutcast server
$scpass "CHANGEME";      // admin password (not DJ) to shoutcast server
$ircsite "irc.server.net";   // IRC Server - EX: irc.server.com

// ######################## END CONFIGURATION AREA ############################ 
change to:

PHP Code:
// ######################## CONFIGURATION AREA ############################
$domain "www.domainhere.com";  // The domain to retrieve the xml
$xmlfile "filename.xml";  //xml filename from your saved stdout 1> filename.xml
$scdef "Shoutcast";   // Default station name
$scip "0.0.0.0";   // ip or url of shoutcast server
$scport "8000";        // port of shoutcast server
$scpass "CHANGEME";      // admin password (not DJ) to shoutcast server - In LynX to www mode no need for it
$ircsite "irc.server.net";   // IRC Server - EX: irc.server.com

// ######################## END CONFIGURATION AREA ############################ 
Now edit the config section to suit. noting the 2 extra bits here

do the template bits and upload the images and index.php file as directed in the hack

run your lynx command in shell and then check out your Shoutcast module page if it worked great
you may want to try it a few times before you add your crontab entry.

Adding crontab from shell is easy, you will more than likely enter the vi editor after issuing the command crontab -e
you might want to do crontab -l first and copy that text safe, so you can easily restore the original cron entries if you mess up.

move your cursor to the line above where you would like your new cron line, hit o
now your in insert mode copy to your clip board your prepared cron line, to run this every 5 minutes would look something like:

Code:
*/5 * * * * lynx -auth=admin:dNASpasshere -source http://dNAS-IP-Or-Domain:port/admin.cgi?mode=viewxml 1> /webserver/path/public_html/filename.xml
paste it in (shift + insert)

hit the esc key

now input :x and hit enter to install your new crontab

enjoy
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01277 seconds
  • Memory Usage 1,796KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete