|
|
#321 |
|
Registered User
|
nm
|
|
|
|
|
|
#322 |
|
Senior Member
Join Date: Jul 2002
Location: irc.mixxnet.net
Posts: 126
|
Hi guys. Just a quick question. I'm not a PHP expert, so I'm wondering how I could add a dash between the artist and song. The station I'm using this for doesn't play "songs", it plays mix sets so it wouldn't make much sense to have "Artist:" and "Song:".
Here is an example of what it looks like now, just need to add a dash in between the artist and 'song name'. Thanks -Mark EDIT: Or even better to have it just take whatever the SHOUTcast server is outputting as the title, because some of our broadcasts don't have a dash in them, some of them just say "DJ Mark Live" and that's it. EDIT2: Look at the title now. It's supposed to say "(Live!) DJ Entertijn - Hardstyle Mix" but it's overlapping wierd. If I can get it to just output whatever the shoutcast server is sending on one line that would be great. Last edited by mixx941; 14th November 2004 at 20:09. |
|
|
|
|
|
#323 |
|
Senior Member
Join Date: Jul 2002
Location: irc.mixxnet.net
Posts: 126
|
Also I notice now that the bottom of the image is getting cut off. That black border around it was all the way around it before, but now you can see it's not at the bottom.
I haven't changed anything since then. |
|
|
|
|
|
#324 |
|
Junior Member
Join Date: Nov 2004
Posts: 3
|
I'm getting a 404 on the links
|
|
|
|
|
|
#325 |
|
Junior Member
Join Date: Oct 2004
Posts: 26
|
Can someone post the unedtited script here, im getting a 404 error while viewing the page
|
|
|
|
|
|
#326 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
sorry for bringing up a "supposed to be" dead topic, but im having some slight issues with your code Ruffdawg. but before i forget: GIjoe, check a few pages back. ruffdawg posted the working code in response to someone else posting their code which was "messed up".
now, heres the trouble: my site runs phpnuke. ive been trying to put some kind of now playing message in the header, but for some stupid reason, it wont allow any php code. it somehow omits all the php code put up there. so my last resort has been to use this sig code, but modified somewhat. ive managed to reduce it to a single line, and ive changed the background image to a gif so i can use transparencies (all that shows on the site is the now playing words, nothing else). in addition, instead of having the "Now Playing:" part of the bg image, i want it outputted as part of the actual song title. ive managed to do this. but when the station is running, it says "Now Playing: Array" instead of "Now Playing: Artist - Title". any ideas? heres the link to the image: http://www.pokeradio.com/images/np.php (may be hard to see on a white background. aamof, it IS hard to see on white. lol). and here is my code: PHP Code:
|
|
|
|
|
|
#327 |
|
Major Dude
|
PHP Code:
PHP Code:
PHP Code:
Words are very unnecessary, they can only do harm, so enjoy the silence - Depeche Mode Firemonger Project: Help spread Firefox |
|
|
|
|
|
#328 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
thx. it all works perfectly now.
|
|
|
|
|
|
#329 |
|
Senior Member
Join Date: Jul 2004
Posts: 390
|
Hey gaus this work but its always says it Offline :S See it at http://www.alvaran.ws/uh/uh.php This is the Code i have.
Can you help me? PHP Code:
|
|
|
|
|
|
#330 |
|
Junior Member
Join Date: Dec 2004
Location: Basildon, UK
Posts: 27
|
Look on the forum for my post, i could do it for you for £1 via nochex
|
|
|
|
|
|
#331 |
|
Major Dude
|
@dannidj: Probably, probs with the host where you're running the script. They could have disabled the fsockopen() function or they could be blocking outgoing connections to certain ports. Ask them about it or run the script on another host.
Words are very unnecessary, they can only do harm, so enjoy the silence - Depeche Mode Firemonger Project: Help spread Firefox |
|
|
|
|
|
#332 |
|
Junior Member
|
The error was:
HTTP 404 - Page Not Found Sorry, this page is not available |
|
|
|
|
|
#333 |
|
Major Dude
|
what?
Words are very unnecessary, they can only do harm, so enjoy the silence - Depeche Mode Firemonger Project: Help spread Firefox |
|
|
|
|
|
#334 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
sorry for bringing up the topic yet again, but does anyone know how i can make it so it seperates the artist from the song title using the last hyphen it finds? because many of the songs i have use a hyphen in the artist field and its confusing the now playing script.
|
|
|
|
|
|
#335 |
|
Junior Member
Join Date: Dec 2004
Posts: 15
|
can someone paste me a working code script. mine seems to get an error
|
|
|
|
|
|
#336 | ||
|
Major Dude
|
Quote:
PHP Code:
Quote:
Words are very unnecessary, they can only do harm, so enjoy the silence - Depeche Mode Firemonger Project: Help spread Firefox Last edited by 101; 30th January 2005 at 22:33. |
||
|
|
|
|
|
#337 |
|
Junior Member
Join Date: Apr 2004
Posts: 16
|
Hi, I have a small problem with this. It's not recognizing my DNAS is open. Any help?
|
|
|
|
|
|
#338 |
|
Major Dude
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
|
Hey guys, Just to let you know, you can always find the latest version of the script at http://www.ruffdawgradio.com/sig.phps
This is the best way of obtaining the code, since it is not edited, unless more cool features are added. I am very open minded about the open-source community, so if you feel there are some features that should be added, please feel free to email me at admin@ruffdawgradio.com Thanks |
|
|
|
|
|
#339 |
|
Senior Member
Join Date: Jul 2004
Posts: 390
|
ok but i want to know how shut i chanche the collor from blue to som another?
|
|
|
|
|
|
#340 |
|
Senior Member
Join Date: Jul 2004
Posts: 390
|
ok but i want to know how shut i chanche the collor from blue to som another?
|
|
|
|
|
|
#341 |
|
Senior Member
Join Date: Jul 2004
Posts: 390
|
ok but i want to know how shut i chanche the collor from blue to som another?
|
|
|
|
|
|
#342 |
|
FRISIAN (MOD)
Join Date: Sep 2003
Location: in a house
Posts: 16,103
|
// text colors are in RGB
$text_color1 = ImageColorAllocate($im,0,153,255); $text_color2 = ImageColorAllocate($im,0,153,255); there you change that. oh and while i'm here, try to type normal english please it makes your question a lot easier and your sign is a bit too big (see rules about the size) |
|
|
|
|
|
#343 |
|
Junior Member
Join Date: Apr 2004
Posts: 14
|
Sorry could you please try giving me a link which works to download this script I just want a plain background if possible so the background is see through like so it matches a forum layout. I Guess I need a few files to upload for this I tried the link but got nothing from it
![]() Thanks. |
|
|
|
|
|
#344 |
|
FRISIAN (MOD)
Join Date: Sep 2003
Location: in a house
Posts: 16,103
|
http://forums.winamp.com/showthread....6#post1536486, copy the php script from there.
ajust the color settings and you have it. |
|
|
|
|
|
#345 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
if you check my website, the now playing at the top uses this same script. what i did to make the background see through was create a long gif file to fir that part of the site. made it all black. then took it into irfanview and saved it and made the black transparent.
|
|
|
|
|
|
#346 |
|
Junior Member
Join Date: Sep 2004
Posts: 16
|
Ruffdawg is ther a way to cahnge the font, or are you working on that? and what font is being used now on it? I want to try to match it up.
|
|
|
|
|
|
#347 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
the font depends on the web server. it uses system fonts.
|
|
|
|
|
|
#348 |
|
Major Dude
|
You can upload a font to the server and get the script to generate the image based on the font.
Google it, I can't remember off the top of my head - but i've done it before. |
|
|
|
|
|
#349 |
|
Junior Member
Join Date: Apr 2005
Posts: 4
|
All worked fine for me :P
Thx alot. |
|
|
|
|
|
#350 |
|
Junior Member
Join Date: Apr 2004
Posts: 14
|
I have
<?php // This Script was created by Ruff Dawg, in conjunction, and many thanks to, // DJ Rampage's script. Your Welcome in advance // This image you can call immediately from an html file in the image tag // (i.e. <image src="black.php"> ) easy huh? Header("Content-type: image/gif"); $im = imagecreatefromgif("sigpic.gif"); //change sigpic.png to your picture file // Fill in your own server information here: $host = "reddog.wavestreamer.com"; //without <a href="http://" target="_blank">http://</a> $port = "8450"; $listenlink = 'http://reddog.wavestreamer.com:8450/listen.pls'; //make link to stream $fp = fsockopen("$host", $port, &$errno, &$errstr, 30); //open connection if(!$fp) { $success=2; //se-t if no connection } if($success!=2){ //if connection fputs($fp,"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); //get 7.html while(!feof($fp)) { $page .= fgets($fp, 1000); } fclose($fp); //close connection $page = ereg_replace(".*<body>", "", $page); //extract data $page = ereg_replace("</body>.*", ",", $page); //extract data $numbers = explode(",",$page); //extract data $currentlisteners=$numbers[0]; //set variable $connected=$numbers[1]; //set variable if($connected==1) //if DSP is connected $wordconnected="yes"; //set variable else //if no DSP connection $wordconnected="no"; //set variable $peaklisteners=$numbers[2]; //set variable $maxlisteners=$numbers[3]; //set variable $reportedlisteners=$numbers[4]; //set variable } // text colors also in RGB $text_color1 = ImageColorAllocate($im,255,255,255); $text_color2 = ImageColorAllocate($im,0,0,255); if($success!=2 && $connected==1){ // song information is splitted in artist - title: // This requires consistent artist & title format (no ' - ' in title/artist) // else you can use $numbers[6] as current song info below $song=explode(" - ",$numbers[6]); // strings can of course be replaced with your own idea's $string1= "Now Playing: " . $song=explode(" - ",$numbers[6]); } else { $string1= "PokeRadio is Temporarily Offline"; } // positioning below //(image,font (from 1 to 5),starting x position, y position,line of text,color) $px = (imagesx($im)-5*strlen($string1))/2; ImageString($im,3,10,10,$string1,$text_color1); Imagegif($im); ?> saved as whatever.php for example but what do I do to get the image? |
|
|
|
|
|
#351 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
for those who are curious, here is the code i have going for the now playing bar on my site which uses this same script:
PHP Code:
the associated image is also attached. one note though, to keep the transparency, make sure that whatever program you use to edit the gif (if you need it edited) can set the transparency. then just make sure the black becomes transparent. |
|
|
|
|
|
#352 |
|
Junior Member
Join Date: Apr 2004
Posts: 14
|
ok... I am being incredibly stupid here I know
Bit if I go to my pahe of php scripting I presume I save it as something.php and then go there and get an image? or am I being stupid? I thought before when I tried this that you had two scripts and one generated an image and the other one didn't... I just see script when I go to the place where I have the script and yes the server can run .php scripts! So Where or what the hell do I do now to get this thing to work!!
|
|
|
|
|
|
#353 |
|
Major Dude
Join Date: Feb 2003
Location: Mississauga, Ontario, Canada (Sauga Represent!)
Posts: 565
|
Okay I just wanna quickly point something out. The script that Vchat20 has been edited so you can use the .gif file in conjunction with the script. The one I offer on my site if for .png extentions. Both extententions offer transparency.
Josh2004, its not 2 scripts, its one script, and a picture file in the same folder. The script calls the picture file. sigpic.png is the default. Would anyone find it easier if i zipped the script and a default background file? doing so, i'll clean up/add to the code and re-releasing the script. |
|
|
|
|
|
#354 |
|
Major Dude
Join Date: Aug 2002
Posts: 1,273
|
dont matter to me. im quite satisifed with it. heck, if it wasnt for your script, id be shit up a creek right now trying to figure how to show the now playing song in my sig/site.
btw, IE doesnt show true transparency with png's. for example, if i was to use a png as the background for my sites np script, the top behind the song title would be grey. |
|
|
|
|
|
#355 |
|
Junior Member
Join Date: Jan 2004
Location: Near Atlanta
Posts: 17
|
Hi, I have the sig code working fine on my site; but I play Old Time Radio shows from the 1930's, 40's and 50's with a little old music mixed in. My problem with the script is that many of my shows have comma's, dollar signs, pound signs, etc. in either the author or title fields; so they don't display correctly.
For instance I just played: Tarzan, Lord Of The Jungle - 511108 (44) Adventure On The Road To Timbuktu and the sig script only displayed "Tarzan". I'm already using this to get past any dashes: $song=$numbers[6]; Any help for a non-php guy!???? Thanks!!! Bob here's a link to my sig... http://www.bobmerritt.com/OTR/bobsig.php |
|
|
|
|
|
#356 |
|
Junior Member
Join Date: Jan 2004
Location: Near Atlanta
Posts: 17
|
OK... I went out and bought 2 PHP books and I figured it out for myself!!! Here's my code mods to allow commas in the artist/title..
PHP Code:
http://www.bobmerritt.com/OTR/bobsig.php and I'm NO programmer, so please don't ask me to explain. I'm just good at figuring some scripting out. ![]() Thanks, Bob |
|
|
|
|
|
#357 |
|
Junior Member
Join Date: Jan 2005
Posts: 6
|
[edit]figured it out, nevermind.
Last edited by priestx; 17th July 2005 at 07:41. |
|
|
|
|
|
#358 |
|
Junior Member
Join Date: Sep 2006
Location: Upstate NY
Posts: 8
|
my php signature script
I am having a bit of an issue. I am using the php script posted here by DJRampage a while back. I got the script working (half way) it just doesn't show what song is playing ect...
Here is my php file: http://www.jcnoveltyshop.com/images/signa.php I have edited the script temporarily to always show that it is online, because right now the script is going right to saying that it is "offline" Here is my script: Can anybody help me and point out any problems? <?php Header("Content-type: image/png"); $host = "radiofuckers.serverroom.us"; $port = "7218"; $listenlink = 'http://radiofuckers.serverroom.us:7218/listen.pls'; $fp = fsockopen("$host", $port, &$errno, &$errstr, 30); if(!$fp) { $success=2; } if($success!=2){ fputs($fp,"GET /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!feof($fp)) { $page .= fgets($fp, 1000); } fclose($fp); $page = ereg_replace(".*<body>", "", $page); $page = ereg_replace("</body>.*", ",", $page); $numbers = explode(",",$page); $currentlisteners=$numbers[0]; $connected=$numbers[1]; if($connected==1) $wordconnected="yes"; else $wordconnected="no"; $peaklisteners=$numbers[2]; $maxlisteners=$numbers[30]; $reportedlisteners=$numbers[4]; } $im = ImageCreate(200,60); $background_color = ImageColorAllocate($im,255,255,255); $text_color1 = ImageColorAllocate($im,0,0,0); $text_color2 = ImageColorAllocate($im,119,43,26); if($success!=2 && $connected==1){ $song=explode(" - ",$numbers[6]); $string1= "Now playing on RadioFuckers"; $string2= $song[0]; $string3= $song[1]; $string4= "[$currentlisteners/$maxlisteners users]"; } else { $string1= "RadioFuckers is currently"; $string2= "ONLINE"; $string3= "www.radiofuckers.com"; $string4= ":::"; } $px = (imagesx($im)-5*strlen($string1))/2; ImageString($im,1,$px,5,$string1,$text_color1); $px = (imagesx($im)-5*strlen($string2))/2; ImageString($im,1,$px,20,$string2,$text_color2); $px = (imagesx($im)-5*strlen($string3))/2; ImageString($im,1,$px,30,$string3,$text_color2); $px = (imagesx($im)-5*strlen($string4))/2; ImageString($im,1,$px,45,$string4,$text_color1); ImagePng($im); ImageDestroy($im); ?> |
|
|
|
|
|
#359 |
|
Forum King
Join Date: Feb 2006
Location: Earth Circa sometime.
Posts: 3,297
|
RF,. it works it shows you are ONLINE
so its your pc not the script causing the display problem ~ According to the ship's log we're down to our last 3000 vomit bags.It'll never be enough. ![]() search the forums! don't PM me on how-to, or ask me to setup you system. you do it so you learn. |
|
|
|
|
|
#360 | |
|
Junior Member
Join Date: Sep 2006
Location: Upstate NY
Posts: 8
|
Quote:
} else { $string1= "RadioFuckers is currently"; $string2= "ONLINE"; $string3= "www.radiofuckers.com"; $string4= ":::"; It should be this: } else { $string1= "RadioFuckers is currently"; $string2= "OFFLINE"; $string3= "Check Back Later"; $string4= ":::"; The reason I edited it, is because that is all that I was getting, and I felt that people seeing that we were "offline" would turn them away. I should be getting a "status relay" kinda thing. Showing the current song playing, listeners ect... I hope this helps clear it up a bit, I hope that somebody can help me with this issue, I am stumped. |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|