Page 1 of 1

anyone know php here?

Posted: Fri Oct 17, 2008 9:54 pm
by fragged one
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?

Posted: Sat Oct 18, 2008 1:36 am
by Chris Vogel
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

anyone know php here?

Posted: Sat Oct 18, 2008 11:59 pm
by fragged one
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

anyone know php here?

Posted: Sun Oct 19, 2008 11:54 am
by fragged one
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

anyone know php here?

Posted: Sun Oct 19, 2008 11:21 pm
by Chris Vogel
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:

Code: Select all

DirectoryIndex index.php index.html
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:

Code: Select all

<?php
include('/path/to/scxml.php');
?>
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

anyone know php here?

Posted: Sun Oct 26, 2008 10:00 pm
by fragged one
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