Our logo

Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> anyone know php here?

fragged one
post Oct 17 2008, 08:54 PM
Post #1


DJ Vibrating Wang
****

Group: Members
Posts: 1 779
Joined: 24-June 04
From: Austin, TX
Member No.: 3
Gender: Male



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.


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Chris Vogel
post Oct 18 2008, 12:36 AM
Post #2


Most glorious member
****

Group: Members
Posts: 1 911
Joined: 24-June 04
From: Lawrenceburg, Tennessee, United States
Member No.: 2
Gender: Male



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?


--------------------
E-mail, XMPP: chris@chrisvogel.name (OpenPGP)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
fragged one
post Oct 18 2008, 10:59 PM
Post #3


DJ Vibrating Wang
****

Group: Members
Posts: 1 779
Joined: 24-June 04
From: Austin, TX
Member No.: 3
Gender: Male



i don't even know how to put it in our page. lol


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
fragged one
post Oct 19 2008, 10:54 AM
Post #4


DJ Vibrating Wang
****

Group: Members
Posts: 1 779
Joined: 24-June 04
From: Austin, TX
Member No.: 3
Gender: Male



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


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Chris Vogel
post Oct 19 2008, 10:21 PM
Post #5


Most glorious member
****

Group: Members
Posts: 1 911
Joined: 24-June 04
From: Lawrenceburg, Tennessee, United States
Member No.: 2
Gender: Male



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
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

<?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.


--------------------
E-mail, XMPP: chris@chrisvogel.name (OpenPGP)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
fragged one
post Oct 26 2008, 09:00 PM
Post #6


DJ Vibrating Wang
****

Group: Members
Posts: 1 779
Joined: 24-June 04
From: Austin, TX
Member No.: 3
Gender: Male



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



--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicTopic OptionsStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members: