i'm trying to get a script working for our website to display shoutcast information from a shoutcast server. i need it to display dj name, current id3 tag, last 5 or 10 songs.
i have the script that supposedly does it, but i don't know how to configure it and get it displayed on our web page.
Archived topic from Anythingforums, old topic ID:3811, old post ID:67253
anyone know php here?
-
- Posts: 5140
- Joined: Fri Jan 10, 2003 1:14 am
anyone know php here?
What do you get if you try to view the page in your browser? Does the script actually execute, or do you just see the PHP source code?
Archived topic from Anythingforums, old topic ID:3811, old post ID:67258
Archived topic from Anythingforums, old topic ID:3811, old post ID:67258
- fragged one
- Posts: 1735
- Joined: Thu Jun 24, 2004 5:51 pm
anyone know php here?
i don't even know how to put it in our page. lol
Archived topic from Anythingforums, old topic ID:3811, old post ID:67271
Archived topic from Anythingforums, old topic ID:3811, old post ID:67271
no u!
- fragged one
- Posts: 1735
- Joined: Thu Jun 24, 2004 5:51 pm
anyone know php here?
here's what i have. it's pretty straightforward, i can plug all the necessary information into the files, but how do i get the data i need to display on my home page?
http://www.kription.com/scxml/recent.html
Archived topic from Anythingforums, old topic ID:3811, old post ID:67272
http://www.kription.com/scxml/recent.html
Archived topic from Anythingforums, old topic ID:3811, old post ID:67272
no u!
-
- Posts: 5140
- Joined: Fri Jan 10, 2003 1:14 am
anyone know php here?
If you visit scxml.php in your browser, does the page display the songs? If so, move scxml.php , scxml-obj.php , config.php , and sc-small.gif to their own folder.
After you do that, rename your index page index.php instead of index.html and put a file called .htaccess (notice the dot) into the DocumentRoot directory if it’s not already there. In that file, put this:
Or edit the line already there so that index.php comes before index.html .
Then, if your home page still works, put the following at the top of it and make sure you don’t get any errors afterward:
Keep in mind that absolute paths in include() start at root of your file system, not your Web site.
Then take that large block of echo statements out of scxml.php , with a <?php added at the beginning and a ?> at the end, and place it into index.php at whichever point you want it to appear. If that works, you’ll have to modify the HTML within the echo statements, because it will likely mess up the layout of your page (and you shouldn’t have two <html> elements, <body> elements, etc.). Remember to escape the HTML’s quotation marks like they have done.
You can echo those variables on other pages too, so long as you put the include line at the top and give the page a .php extension.
You might want to copy your home page to a test directory and get it working there first! Also, includes are a good way to centralize things that repeat themselves in every page – sidebars, headers, footers, etc. Adding something to your sidebar would mean editing just one file instead of every page on your site.
Archived topic from Anythingforums, old topic ID:3811, old post ID:67273
After you do that, rename your index page index.php instead of index.html and put a file called .htaccess (notice the dot) into the DocumentRoot directory if it’s not already there. In that file, put this:
Code: Select all
DirectoryIndex index.php index.html
Then, if your home page still works, put the following at the top of it and make sure you don’t get any errors afterward:
Code: Select all
<?php
include('/path/to/scxml.php');
?>
Then take that large block of echo statements out of scxml.php , with a <?php added at the beginning and a ?> at the end, and place it into index.php at whichever point you want it to appear. If that works, you’ll have to modify the HTML within the echo statements, because it will likely mess up the layout of your page (and you shouldn’t have two <html> elements, <body> elements, etc.). Remember to escape the HTML’s quotation marks like they have done.
You can echo those variables on other pages too, so long as you put the include line at the top and give the page a .php extension.
You might want to copy your home page to a test directory and get it working there first! Also, includes are a good way to centralize things that repeat themselves in every page – sidebars, headers, footers, etc. Adding something to your sidebar would mean editing just one file instead of every page on your site.
Archived topic from Anythingforums, old topic ID:3811, old post ID:67273
- fragged one
- Posts: 1735
- Joined: Thu Jun 24, 2004 5:51 pm
anyone know php here?
thx for your help chris. we managed to get it all working like a champ. the main problem? we need our web host to open up a port. lol
btw, y'all should check us out here at http://rockinroyalradio.com
Archived topic from Anythingforums, old topic ID:3811, old post ID:67304
btw, y'all should check us out here at http://rockinroyalradio.com
Archived topic from Anythingforums, old topic ID:3811, old post ID:67304
no u!