Questions about PHP script output files

Ask questions, request features, or just complement us about our software and services.
Post Reply
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

Questions about PHP script output files

Post by aadriabrown »

I\'ve painstakingly read all the readme files, and the online documentation. I then read the forum posts so I didn\'t post questions which had been answered rofl. Hopefully I haven\'t missed anything and my question is less painful to the guru :P

I\'ve set up the PHP files which downloaded with the radiotoolbox, I altered them and set up the server. Everything from my desktop appears to be working nicely, it says it is updating and scripting. I went to the web and typed in the file location for the catcher.php file, attempting to find the completed file with the song and title information. I received the message about adding ?debug=USERNAME. I did this and everything came out just fine. The files all exist and are writable.

I\'m at a loss now however, everything seems to be in place and working. Yet, i\'m not finding a completed file which I could include with a website for streaming data on this clients server. Normally I only build the site, this time I was asked to include the streaming data. I had no idea what I was getting into rofl. Any advice on steps I could take to remedy this would be greatly appreciated. Thank you.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

when you go to a url in your browser go to the example.php file, not the catcher script. That is only there for radio toolbox communication with the website.
- Jay
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

PHP files

Post by aadriabrown »

I did go to the example file after the catcher file, it is blank on the screen and has:
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
Over and over in the page source code. 8O
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

can you provide a link to your example file please.
- Jay
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

Thank you

Post by aadriabrown »

Thank you Jay for your time, and replies. Here are the links to all the catcher files on the website.
http://www.wetspotradio.com/catcher/
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

An Update

Post by aadriabrown »

Howdy Jay,
Just wondering if you had any advice about my catcher files, I have gone through and done them all again making sure I didn\'t miss anything.
I still can\'t get it to work, it\'s got to be some kind of scripting error that i\'ve made.

Any guidance would be greatly appreciated. ty :D
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

when you uploaded them to your server did you use FTP? If so, did you upload them in ASCII mode?
- Jay
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

AscII

Post by aadriabrown »

Yes on both, I used FTP and ASCII, did I do the wrong way? lol
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

open up your includes.php file and tell me what you see in that file?
- Jay
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

Includes.PHP

Post by aadriabrown »

In the includes.php file I see this:
<!-- Song stats Generated by Radio ToolBox written by Jay Krivanek -->
<?php
include("includes.php");
?>
<HTML>
<TITLE>WetSpot Radio... LIVE!</TITLE>
<BODY>
Currently Playing <b><?php echo $current_song; ?></b> right now, it's totally cool!<br>
There are <?php echo $listeners; ?> out of <?php echo $max_listeners; ?> listening.<br><br>

The last <?php echo sizeof($lastsong); ?> songs I have played are:<br>
<?php
$i = 0;
while ($lastsong[$i])
{
echo $lastsong[$i];
echo "<br>";
$i++;
}
?>

Also, the strangest files have appeared in the directory where the catcher files are.
core(then numbers like 8766,8693,8631 etc) theya re very large files too... 27,824kb avg.
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

yea your includes file should definately not look like that, empty out that file.
- Jay
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

Success!!

Post by aadriabrown »

It took time, patience and a lot of dirty words. Thank you for your help, it works wonderfully. I was going to ask how to incorporate it into the site on the index page but I believe I've read many people are using inline frames for the php code. In your opinion is this the best way? Thanks a million... IT WORKS!!
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

nah if you want to include it in any page just do so by using php

Code: Select all

<?php include("path/to/includes.php"); ?>
<body>
blah blah
Some stat: <?php echo $var_in_includes; ?>
blah blah
</body>
etc
If you use FTP then just use the inline frames stuff.
- Jay
aadriabrown
Posts: 8
Joined: Mon Jun 06, 2005 6:01 pm

Thanks!... but

Post by aadriabrown »

Ok so i'm a dork.. I dunno I put the php script <?php blah blah at the top like I was supposed to, but I copied the PHP stat script from the example file. It shows up just fine in any page but it isn't producing a stat... it just sits there and looks pretty.

I used this in the middle of the page

<TABLE align="center" width="95%">
<TR><TD bgcolor="888888"><font face="Tahoma" color="FFFFFF" size="2">
Current Song: <b><?php echo $current_song; ?></b><br>
Listeners: <?php echo $listeners; ?>/<?php echo $max_listeners; ?></font><TD><TR>
</TABLE>

The link to the site is.. http://www.wetspotradio.com

Thanks again
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

rename your main page from index.html to index.php

all php scripts must have this extension in most standard installations of php.
- Jay
Post Reply