[php] winamp sig

sutsurikeru said:
ages ago i had a winamp sig n it worked fine using the exact code as shown below
PHP:
<?php
// ----------------------------------------
// 
Winamp Update By Niels van Renselaar
// Speciaal voor webscripters.nl
// ----------------------------------------
function inkort($txt, $length) { if(strlen($txt) > $length) { $txt = substr($txt, 0, $length)."..."; ** return $txt; **
$content = $_GET[song];
if($content) {
$liedje = stripslashes(inkort($content, 30));
header("Content-type: image/JPEG");
$plaatje = ImageCreateFromJPEG(\"http://sutsurikeru.net/winampsig/sig.jpeg\");
$white = Imagecolorallocate($plaatje, 000, 000, 000);
$zwart = ImageColorAllocate($plaatje, 000, 000, 000);
imagestring($plaatje, 3, 70, 6, $liedje, $zwart);
ImageJPEG($plaatje, "winamp.jpeg", 100);
ImageDestroy($plaatje);
**
?>
but its given errors
Parse error: parse error, unexpected T_STRING in line 4
i looked up t string error but im clueless lol
anyhelp will be great ty


What is the name of the plugin u used for this?
 
winamp plugin is called AIMP.. it is also the same winamp plugin i use to say the song im playing on IRC ...

that plugin + curl ( a url to text file writer ) + gd for php ( to create the images )
 
Well here is the long awaited winamp sig :D

The things you need are:

Server that supports php
A brain
Winamp
Know how to install a plugin

Ok shall we begin?

1. Ok first find a server that supports php, a free server that supports php is tripod.co.uk

2. Create a Directory called winampsig "Eg: www.mysuperdupersute.com/winampsig

3. Now open note pad and copy the following

Code:
<?php

function inkort($txt, $length) { if(strlen($txt) > $length) { $txt = substr($txt, 0, $length)."..."; ** return $txt; **

$content = $_GET[song];
if($content) {
$liedje = stripslashes(inkort($content, 30));
header("Content-type: image/JPEG");
$plaatje = ImageCreateFromJPEG("[B]http://www.ursite.com/winampsig/sig.jpg[/B]");
$white = Imagecolorallocate($plaatje, 000, 000, 000);
$zwart = ImageColorAllocate($plaatje, 000, 000, 000);
imagestring($plaatje, 3, 70, 6, $liedje, $zwart);
ImageJPEG($plaatje, "winamp.jpeg", 100);
ImageDestroy($plaatje);
**

This will will make the winamp plugin talk to your webserver

Code:
$white = Imagecolorallocate($plaatje, 000, 000, 000);
$zwart = ImageColorAllocate($plaatje, 000, 000, 000)

Edit the number values to change the color of the text on the final sig, don't really have to that now.

Save this as index.php and upload to where you made your winamp sig directory

4. Install the plugin. Unrar/Unzip the file called InfoSender-1.1

There will be a file called "gen_sender.dll" in that folder, this is the plugin. Now copy this plugin to this directory "C:\Program Files\Winamp\Plugins"

5. Once you have done that load winamp and press "Ctrl + P" to bring up winamps options. Under the plug-ins header find General purpose


Double click where it says lukes info sender to configure the plugin.

Now put where you uploaded the index.php file to. I'll use where i saved my winamp sig to as an example

http://ursite.com/winampsig/index.php?song=

remember to put "?song=" at the end of index.php

Also tick the enabled box to enbable the plugin.

thn it will work like mine, you will also have to make the sig the same shape as mine and it needs to be called winamp.jpg, once u upload the sig to the space u have the script will generate another image called winamp.jpeg which u use in ur siggy
 

Attachments

PHP:
<?php
function inkort($txt, $length) { if(strlen($txt) > $length) { $txt = substr($txt, 0, $length)."..."; ** return $txt; **
$content = $_GET[song];
if($content) {
$liedje = stripslashes(inkort($content, 30));
header("Content-type: image/JPEG");
$plaatje = ImageCreateFromJPEG("http://robhost.sytes.net/sig/winamp.jpg");
$white = Imagecolorallocate($plaatje, 000, 000, 000);
$zwart = ImageColorAllocate($plaatje, 000, 000, 000);
imagestring($plaatje, 3, 70, 6, $liedje, $zwart);
ImageJPEG($plaatje, "winamp.jpeg", 100);
ImageDestroy($plaatje);
**

When i go to http://127.0.0.1/sig/ i get this error:
Parse error: parse error in c:\usr\apache\httpd\html\sig\index.phpp on line 2
 
Last edited:
does it that really work??? all i can see is that winamp opens a url.. and thats it.

if thats even a dynamic winamp sig.. it has to save the data somewer and then when the php file is read via a forum or as a image.. it will retrieve the saved data and display it.
 
Last edited:
CoALa said:
PHP:
<?php
function inkort($txt, $length) { if(strlen($txt) > $length) { $txt = substr($txt, 0, $length)."..."; ** return $txt; **
$content = $_GET[song];
if($content) {
$liedje = stripslashes(inkort($content, 30));
header("Content-type: image/JPEG");
$plaatje = ImageCreateFromJPEG("http://robhost.sytes.net/sig/winamp.jpg");
$white = Imagecolorallocate($plaatje, 000, 000, 000);
$zwart = ImageColorAllocate($plaatje, 000, 000, 000);
imagestring($plaatje, 3, 70, 6, $liedje, $zwart);
ImageJPEG($plaatje, "winamp.jpeg", 100);
ImageDestroy($plaatje);
**

When i go to http://127.0.0.1/sig/ i get this error:
Parse error: parse error in c:\usr\apache\httpd\html\sig\index.phpp on line 2
ur php configured correct?
 
Back