Old 7th March 2004, 04:09   #1
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
New Sig Code With Custom Background!!

Hello,

I was waiting for the perfect script to come along, since i knew very little about PHP, and it took me a while, but here it is!

This PHP script, will allow you to show what is currently playing, while at the same time, using a user-created background. Meaning, instead of having a boring old black background, you can insert a picture! It's where my sig comes from. Don't worry about if you are not broadcasting or not, it will give a 'not broadcasting' message if you are offline.

You can find the code at:
www.freepgs.com/ruffdawg/sigcode.phps

I hope you all enjoy the script as much as I do!


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 7th March 2004, 07:03   #2
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Sorry, but it's too large.

More than 4 times the suggested pixel limit.

Please fix.

FesterHead is offline   Reply With Quote
Old 7th March 2004, 09:41   #3
Jay
Moderator Alumni
 
Jay's Avatar
 
Join Date: May 2000
Location: Next Door
Posts: 8,942
mines not a boring old background.
Jay is offline   Reply With Quote
Old 7th March 2004, 13:14   #4
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
wow, is it 4 times to wide or to tall?

I know jackherer's sig was fairly tall. But note taken.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 7th March 2004, 14:46   #5
DJ X
Member
 
Join Date: Nov 2003
Location: North Carolina
Posts: 83
Send a message via AIM to DJ X
Nice.
DJ X is offline   Reply With Quote
Old 7th March 2004, 16:15   #6
4thegroove.com
Junior Member
 
Join Date: Feb 2004
Posts: 24
that is sweet...hope i can uderstand all that php to change it...
4thegroove.com is offline   Reply With Quote
Old 7th March 2004, 16:38   #7
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
It's really not hard at all. Just enter your address, port and your .png filename (eg: sigpic.png)


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 7th March 2004, 17:32   #8
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Better, but please try to crunch it a little more.

I don't want to be the signature police and have to look at everyones pixel and file size.

Remember, each and every post here has a "Report this post to a moderator" link. Feel free to use it for material (including sigantures) that borders or exceeds the rules.

FesterHead is offline   Reply With Quote
Old 7th March 2004, 23:15   #9
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Hi, I hope it's fixed by now. I hope everyone enjoys the code


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 8th March 2004, 06:54   #10
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
ruffdawg, I'm trying to use your code, but it's not working for me. All I get is a black box. Below, yoou'll find my code. Can you tell me what I'm doing wrong?

<code><font color="#000000">
<font color="#0000CC">&lt;?php
<br /></font><font color="#FF9900">// This Script was created by Ruff Dawg, in conjunction, and many thanks to,
<br />// DJ Rampage's script. Your Welcome in advance
<br />
<br />// This image you can call immediately from an html file in the image tag
<br />// (i.e. &lt;image src="black.php"&gt&nbsp;&nbsp;&nbsp;&nbsp;easy huh?
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">Header</font><font color="#006600">(</font><font color="#CC0000">"Content-type: image/png"</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$im&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">imagecreatefrompng</font><font color="#006600">(</font><font color="#CC0000">"Playing.png"</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//change sigpic.png to your picture file
<br />
<br />// Fill in your own server information here:&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$pcradionetwork.no-ip.com/&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"host (without 'http://')"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$8000&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"port"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$pcradionetwork.no-ip.com:8000/listen.pls&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#CC0000">'http://rdr.zapto.org:8000/listen.pls'</font><font color="#006600">;&nbsp;&nbsp;</font><font color="#FF9900">//make link to stream
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$fp&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">fsockopen</font><font color="#006600">(</font><font color="#CC0000">"$host"</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$port</font><font color="#006600">,&nbsp;&amp;</font><font color="#0000CC">$errno</font><font color="#006600">,&nbsp;&amp;</font><font color="#0000CC">$errstr</font><font color="#006600">,&nbsp;</font><font color="#0000CC">30</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//open connection
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">if(!</font><font color="#0000CC">$fp</font><font color="#006600">)&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$success</font><font color="#006600">=</font><font color="#0000CC">2</font><font color="#006600">;&nbsp;&nbsp;</font><font color="#FF9900">//se-t if no connection
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">}
<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</font><font color="#0000CC">$success</font><font color="#006600">!=</font><font color="#0000CC">2</font><font color="#006600">){&nbsp;</font><font color="#FF9900">//if connection
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">fputs</font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">,</font><font color="#CC0000">"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//get 7.html
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">while(!</font><font color="#0000CC">feof</font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">))&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$page&nbsp;</font><font color="#006600">.=&nbsp;</font><font color="#0000CC">fgets</font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">,&nbsp;</font><font color="#0000CC">1000</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">fclose</font><font color="#006600">(</font><font color="#0000CC">$fp</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//close connection
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$page&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">ereg_replace</font><font color="#006600">(</font><font color="#CC0000">".*&lt;body&gt;"</font><font color="#006600">,&nbsp;</font><font color="#CC0000">""</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$page</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//extract data
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$page&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">ereg_replace</font><font color="#006600">(</font><font color="#CC0000">"&lt;/body&gt;.*"</font><font color="#006600">,&nbsp;</font><font color="#CC0000">","</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$page</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//extract data
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$numbers&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">explode</font><font color="#006600">(</font><font color="#CC0000">","</font><font color="#006600">,</font><font color="#0000CC">$page</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//extract data
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$currentlisteners</font><font color="#006600">=</font><font color="#0000CC">$numbers</font><font color="#006600">[</font><font color="#0000CC">0</font><font color="#006600">];&nbsp;</font><font color="#FF9900">//set variable
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$connected</font><font color="#006600">=</font><font color="#0000CC">$numbers</font><font color="#006600">[</font><font color="#0000CC">1</font><font color="#006600">];&nbsp;</font><font color="#FF9900">//set variable
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">if(</font><font color="#0000CC">$connected</font><font color="#006600">==</font><font color="#0000CC">1</font><font color="#006600">)&nbsp;</font><font color="#FF9900">//if DSP is connected
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$wordconnected</font><font color="#006600">=</font><font color="#CC0000">"yes"</font><font color="#006600">;&nbsp;</font><font color="#FF9900">//set variable
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">else&nbsp;</font><font color="#FF9900">//if no DSP connection
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$wordconnected</font><font color="#006600">=</font><font color="#CC0000">"no"</font><font color="#006600">;&nbsp;</font><font color="#FF9900">//set variable
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$peaklisteners</font><font color="#006600">=</font><font color="#0000CC">$numbers</font><font color="#006600">[</font><font color="#0000CC">2</font><font color="#006600">];&nbsp;</font><font color="#FF9900">//set variable
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$maxlisteners</font><font color="#006600">=</font><font color="#0000CC">$numbers</font><font color="#006600">[</font><font color="#0000CC">3</font><font color="#006600">];&nbsp;</font><font color="#FF9900">//set variable
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$reportedlisteners</font><font color="#006600">=</font><font color="#0000CC">$numbers</font><font color="#006600">[</font><font color="#0000CC">4</font><font color="#006600">];&nbsp;</font><font color="#FF9900">//set variable
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">}
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br /></font><font color="#FF9900">// text colors also in RGB
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$text_color1&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">ImageColorAllocate</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">,</font><font color="#0000CC">0</font><font color="#006600">,</font><font color="#0000CC">187</font><font color="#006600">,</font><font color="#0000CC">255</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$text_color2&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">ImageColorAllocate</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">,</font><font color="#0000CC">0</font><font color="#006600">,</font><font color="#0000CC">0</font><font color="#006600">,</font><font color="#0000CC">255</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</font><font color="#0000CC">$success</font><font color="#006600">!=</font><font color="#0000CC">2&nbsp;</font><font color="#006600">&amp;&amp;&nbsp;</font><font color="#0000CC">$connected</font><font color="#006600">==</font><font color="#0000CC">1</font><font color="#006600">){
<br />
<br /></font><font color="#FF9900">// song information is splitted in artist - title:
<br />// This requires consistent artist &amp; title format (no ' - ' in title/artist)
<br />// else you can use $numbers[6] as current song info below
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$song</font><font color="#006600">=</font><font color="#0000CC">explode</font><font color="#006600">(</font><font color="#CC0000">" - "</font><font color="#006600">,</font><font color="#0000CC">$numbers</font><font color="#006600">[</font><font color="#0000CC">6</font><font color="#006600">]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br /></font><font color="#FF9900">// strings can of course be replaced with your own idea's
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$string1</font><font color="#006600">=&nbsp;</font><font color="#0000CC">$song</font><font color="#006600">[</font><font color="#0000CC">0</font><font color="#006600">];
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$string2</font><font color="#006600">=&nbsp;</font><font color="#0000CC">$song</font><font color="#006600">[</font><font color="#0000CC">1</font><font color="#006600">];
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$string3</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"$currentlisteners/$maxlisteners"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$string1</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"Ruff Dawg Radio"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$string2</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"IS"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$string3</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"Temporarily Offline"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />&nbsp;&nbsp;&nbsp;&nbsp;
<br /></font><font color="#FF9900">// positioning below
<br />//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(image,font (from 1 to 5),starting x position, y position,line of text,color)
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$px&nbsp;</font><font color="#006600">=&nbsp;(</font><font color="#0000CC">imagesx</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">)-</font><font color="#0000CC">5</font><font color="#006600">*</font><font color="#0000CC">strlen</font><font color="#006600">(</font><font color="#0000CC">$string1</font><font color="#006600">))/</font><font color="#0000CC">2</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">ImageString</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">,</font><font color="#0000CC">5</font><font color="#006600">,</font><font color="#0000CC">60</font><font color="#006600">,</font><font color="#0000CC">35</font><font color="#006600">,</font><font color="#0000CC">$string1</font><font color="#006600">,</font><font color="#0000CC">$text_color1</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$px&nbsp;</font><font color="#006600">=&nbsp;(</font><font color="#0000CC">imagesx</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">)-</font><font color="#0000CC">5</font><font color="#006600">*</font><font color="#0000CC">strlen</font><font color="#006600">(</font><font color="#0000CC">$string2</font><font color="#006600">))/</font><font color="#0000CC">2</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">ImageString</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">,</font><font color="#0000CC">5</font><font color="#006600">,</font><font color="#0000CC">50</font><font color="#006600">,</font><font color="#0000CC">57</font><font color="#006600">,</font><font color="#0000CC">$string2</font><font color="#006600">,</font><font color="#0000CC">$text_color1</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$px&nbsp;</font><font color="#006600">=&nbsp;(</font><font color="#0000CC">imagesx</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">)-</font><font color="#0000CC">5</font><font color="#006600">*</font><font color="#0000CC">strlen</font><font color="#006600">(</font><font color="#0000CC">$string3</font><font color="#006600">))/</font><font color="#0000CC">2</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">ImageString</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">,</font><font color="#0000CC">5</font><font color="#006600">,</font><font color="#0000CC">85</font><font color="#006600">,</font><font color="#0000CC">80</font><font color="#006600">,</font><font color="#0000CC">$string3</font><font color="#006600">,</font><font color="#0000CC">$text_color1</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">ImagePng</font><font color="#006600">(</font><font color="#0000CC">$im</font><font color="#006600">);
<br />
<br /></font><font color="#0000CC">?&gt;</font>
</font>
</code>

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 11:55   #11
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Whoa, I'm not sure what you did to that thing lol. Okay what you must do is take my script, and paste it into notepad. Edit the script to suit your needs. Then, Save As. You must save this as <whatever>.php , then upload the <whatever>.php along with the .png you have chosen to have for a background. Then upload it to your webhost/server.

Post back if you have any other problems.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 8th March 2004, 13:51   #12
djqwest
Major Dude
 
Join Date: Jun 2002
Location: MotherShip
Posts: 558
Send a message via AIM to djqwest
I get the follow error:

Fatal error</b>: Call to undefined function: imagecreatefrompng() line 9

Something special I need installed on the server? I have php3 and below installed.

The Choons: (128k) - (56k)
djqwest is offline   Reply With Quote
Old 8th March 2004, 14:11   #13
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
The only error I'm getting now is a small box with an x in it. The pic and code have been uploaded. I downloaded the code, chanmged the info and uploaded the file to my server along with the pic. All I get is an empty black box. Do I have to maipulate the image somehow, and if so, how do I do that? Here's the only thing I changed in the code:

<br />// This image you can call immediately from an html file in the image tag
<br />// (i.e. &lt;image src="black.php"&gt&nbsp;&nbsp;&nbsp;&nbsp;easy huh?
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">Header</font><font color="#006600">(</font><font color="#CC0000">"Content-type: image/png"</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$im&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">imagecreatefrompng</font><font color="#006600">(</font><font color="#CC0000">"playing.png"</font><font color="#006600">);&nbsp;</font><font color="#FF9900">//change sigpic.png to your picture file
<br />
<br />// Fill in your own server information here:&nbsp;&nbsp;&nbsp;&nbsp;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$host&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"pcradionetwork.no-ip.com (without 'http://')"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$port&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#CC0000">"8000"</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$listenlink&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#CC0000">'http://pcradionetwork.no-ip.com:8000/listen.pls'</font><font color="#006600">;&nbsp;&nbsp;</font><font color="#FF9900">//make link to stream

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 15:13   #14
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Quote:
Fatal error</b>: Call to undefined function: imagecreatefrompng() line 9
Enable gd.

Check out php.ini

FesterHead is offline   Reply With Quote
Old 8th March 2004, 15:22   #15
djqwest
Major Dude
 
Join Date: Jun 2002
Location: MotherShip
Posts: 558
Send a message via AIM to djqwest
Quote:
Originally posted by FesterHead
Enable gd.

Check out php.ini
I will have to have my adminstrator do this, what is gd exactly?

What should I have to tell them?

Thanks in advance.

The Choons: (128k) - (56k)
djqwest is offline   Reply With Quote
Old 8th March 2004, 15:26   #16
Jay
Moderator Alumni
 
Jay's Avatar
 
Join Date: May 2000
Location: Next Door
Posts: 8,942
gd is a library that allows php to generate compressed images.
Jay is offline   Reply With Quote
Old 8th March 2004, 16:04   #17
rgATL
Major Dude
 
Join Date: Feb 2003
Location: ATL, of course.
Posts: 724
PC Radio Net: How did you take the code from ruffdawg's website? Did you view source on the page? That's what it looks like to me; that's why you have all those FONT COLOR tags in your code.

Just copy/paste the actual code that appears on the page (not the code in "view source").

rg.
rgATL is offline   Reply With Quote
Old 8th March 2004, 16:16   #18
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
I just did what you said. I went there and chose select all, pasted it into a php file, changed the info, uploaded the file and png, and stil get a blank black box.

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 18:30   #19
DJ too
Member
 
Join Date: Aug 2003
Posts: 79
Send a message via AIM to DJ too
i couldn't get it to work either.

my server was up, but it said the offline message.
DJ too is offline   Reply With Quote
Old 8th March 2004, 19:46   #20
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Remember to use the filename & path to your .png picture in the imagecreatefrompng()


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 8th March 2004, 19:51   #21
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Once again, I changed what needed to be changed. Below is what I changed from the original script:

Header("Content-type: image/png");
$im = imagecreatefrompng("Playing.png"); //change sigpic.png to your picture file

// Fill in your own server information here:
$host = "pcradionetwork.no-ip.com (without 'http://')";
$port = "8000";
$listenlink = 'http://pcradionetwork.no-ip.com:8000/listen.pls'; //make link to stream

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 22:07   #22
FesterHead
Alumni
 
FesterHead's Avatar
 
Join Date: Sep 2001
Location: Maui, Hawaii
Posts: 14,108
Bad:
$host = "pcradionetwork.no-ip.com (without 'http://')";

Better:
$host = "pcradionetwork.no-ip.com"; // (without 'http://')

FesterHead is offline   Reply With Quote
Old 8th March 2004, 22:17   #23
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Thanks festerhead. However, after I made the change, i still have nothing but a black box.

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 23:14   #24
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Are you sure there is a 'Playing.png' in the same folder as the php code?


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 8th March 2004, 23:21   #25
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
I'm positive there is. I've uploaded it about 50 times now

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 23:24   #26
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
are you sure there is a capital P in Playing.png? Try re-posting your edited code. Along with links to the .php and the .png

Thanx


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 8th March 2004, 23:51   #27
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Header("Content-type: image/png");
$im = imagecreatefrompng("Playing.png"); //change sigpic.png to your picture file

// Fill in your own server information here:
$host = "pcradionetwork.no-ip.com" (without 'http://')";
$port = "8000";
$listenlink = 'http://pcradionetwork.no-ip.com:8000/listen.pls'; //make link to stream

<a href="http://www.freepgs.com/patcook/Playing.png">

<a href="http://www.freepgs.com/patcook/Playing.php">



__________________

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 8th March 2004, 23:56   #28
ken52787
Major Dude
 
ken52787's Avatar
 
Join Date: Aug 2003
Posts: 1,297
Send a message via AIM to ken52787
well ruff, it works great for me, mucho thank yous.

and pc radio net, are you sure your host has php support?

NSV downloads
An in-depth step by step guide for newbies, coming soon.
ken52787 is offline   Reply With Quote
Old 9th March 2004, 00:00   #29
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
I had to enable he scripting, but I have Scripting/DB : PHP, SSI, MySQL support

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 9th March 2004, 00:00   #30
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
hmmm, Just to clarify, lol you bg is a black box. Okay, I've compiled a new code for smaller bgs like yours.

check out www.freepgs.com/ruffdawg/sigcode2lines.phps

Hopefully this solves your problem, and dont forget, theres some positioning work you might need to do at the bottom, but well see with the new code. Don't worry everyone, the old one works just fine too.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 9th March 2004, 00:07   #31
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Still nothing. What do you mean by positioning. All i did was cange the server info.

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 9th March 2004, 00:10   #32
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Oh the postioning is where you will be putting it on your pic. But it shouldnt matter bcuz it should show up neways.

I saw that you had an error in line 12, which is your host. Did you remember to upload the .php code, along with the .png?


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 9th March 2004, 00:12   #33
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
yes I did

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 9th March 2004, 00:16   #34
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Could you lease either post your full code, or take your code, and paste it into notepad and save it as a phps, then upload it to your server and gimmie the link? thnx


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 9th March 2004, 00:25   #35
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Well, I uploaded the new php code. If you go to http://www.freepgs.com/patcook/Playing.php you'll see it added something inside the box, but it's not what I'm playing. It says array and somehting else.

how do I save a file as phps?

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 9th March 2004, 02:15   #36
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Copy the text from your .php script and paste it into notepad, and save it as <whatever>.phps


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 9th March 2004, 03:14   #37
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Ok. Here's the link to the cod:

http://www.freepgs.com/patcook/Code.phps.txt

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 9th March 2004, 11:45   #38
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
Your .php looks fine to me. What you might want to do, to unleash the full power of your code, its create a kick ass image. and also, yes theres some positioning you can do at the bottom. theres somewhat of a legend there, so it shouldnt be hard. You can make your text bigget, different colors, closer to the center, whatever you like.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Old 9th March 2004, 12:06   #39
PC Radio Net
Senior Member
 
Join Date: Feb 2003
Posts: 482
Send a message via AIM to PC Radio Net Send a message via Yahoo to PC Radio Net
Well, if I go to my Playing.php page and view it, it currently says The PC Radio Network is off the air inside the box. Until 10 AM Eastern, that's right. The Playing.png image doesn't have anything inside the box. What i don't understand is, when I'm on and playing a song, it shows how meny listeners are on, but only says array where the song title and artist goes.

Also, how do I position it so it's centered in the middle and make the text bigger? This is the first time I ever worked with php.

The PC Radio Network: An upbeat variety of the 50s-Today!
PC Radio Net is offline   Reply With Quote
Old 9th March 2004, 19:57   #40
ruffdawg
Major Dude
 
ruffdawg's Avatar
 
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
If you wish to center it, type $px where the 'x' value should be. Yes, you are right, array, for some reason shows up. Did you try using the original script, and positioning it yourself? It might work.


Playin' the best classic rock trax
www.ruffdawgradio.com
ruffdawg is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump