Ok, I now get it working - I know guys, there are many services in
the internet (audiomatch.net) which offer this service, but I wanted an
independent service, so I instaleld directly on my pc's web server:
here is how i installed it - pls if you have any questions ask me thks.
What do you need (if you have win98! like me, should also work win9x! ?
NT as well I think, linux, don't know, but for unix there are much more php
script then for win98 )
1.Abyss Web Server (download at: http://www.aprelium.com )
2.PHP 4 (download the automatic installer at: http://www.php.net )
3.Install PHP__Installer by starting it!
4.Go to aprelium.com - there is an tutorial how to install
PHP4 - which configurations you should set in your abyss server:
---> http://www.aprelium.com/abyssws/php.html <---
5.Then go again to php.net and download the ZIP package,
exract it to a folder and just copy php_gd2.dll to
c:\php\extensions
6.Now open your php.ini in c:\windows and add the following:
there is somewhere extensions directory: "c:\php\extensions"
and search for ";extensions=php_gd2.dll" and make
"extensions=php_gd2.dll"!
Now stop your server and run it from the system tray by right clicking
icon!
Now to the installing of the script: all new *.php files in your
/htdocs directory! files in your htdocs directory reachable at
http://localhost/*.php
Create PNG Version (aka Spammers-paradise compatable ver )
up-png.php
<?php
//config
$password = testpass;
//update song
if (!$_GET[passwd]){ print "NO PASSWORD ";}
if (!$_GET[song]){ print "NO SONG ";}
if ($_GET[passwd] == $password) {
$fp=fopen("song.txt","w");
fwrite($fp, $_GET[song]);
fclose($fp);
$font = 2;
$imgw = ImageFontWidth($font) * strlen($_GET[song]) + (10* ImageFontWidth($font));
if (strlen($_GET[song]) > 45) {
$_GET[song] = substr($_GET[song], 0, 43)."..";
$imgw = ImageFontWidth($font) * strlen($_GET[song]) + (10* ImageFontWidth($font));
}
$imgb = ($imgw -1);
$im = ImageCreate($imgw, 15);
$bgc = ImageColorAllocate($im, 255, 255, 255);
$black = ImageColorAllocate($im, 0, 0, 0);
ImageFill($im, 0, 0, $bgc);
ImageString($im, $font, 3, 0, "Winamp : $_GET[song]", $black);
ImageLine($im, 0, 0, 0, 14, $black);
ImageLine($im, 0, 0, $imgb, 0, $black);
ImageLine($im, $imgb, 0, $imgb, 14, $black);
ImageLine($im, 0, 14, $imgb, 14, $black);
Imagepng($im, "song.png");
} else {
print "password error ";
}
?>
Continued...
Bookmarks