PDA

View Full Version : Small Php Script On Your Own Server



internet.news
11-29-2003, 05:03 PM
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:
---&#62; 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:&#092;php&#092;extensions
6.Now open your php.ini in c:&#092;windows and add the following:
there is somewhere extensions directory: "c:&#092;php&#092;extensions"
and search for ";extensions=php_gd2.dll" and make
"extensions=php_gd2.dll"&#33;

Now stop your server and run it from the system tray by right clicking
icon&#33;

Now to the installing of the script: all new *.php files in your
/htdocs directory&#33; files in your htdocs directory reachable at
http://localhost/*.php

Create PNG Version (aka Spammers-paradise compatable ver )

up-png.php
<?php
//config
&#036;password = testpass;
//update song
if (&#33;&#036;_GET[passwd]){ print "NO PASSWORD ";}
if (&#33;&#036;_GET[song]){ print "NO SONG ";}
if (&#036;_GET[passwd] == &#036;password) {
&#036;fp=fopen("song.txt","w");
fwrite(&#036;fp, &#036;_GET[song]);
fclose(&#036;fp);
&#036;font = 2;
&#036;imgw = ImageFontWidth(&#036;font) * strlen(&#036;_GET[song]) + (10* ImageFontWidth(&#036;font));
if (strlen(&#036;_GET[song]) > 45) {
&#036;_GET[song] = substr(&#036;_GET[song], 0, 43)."..";
&#036;imgw = ImageFontWidth(&#036;font) * strlen(&#036;_GET[song]) + (10* ImageFontWidth(&#036;font));
}
&#036;imgb = (&#036;imgw -1);
&#036;im = ImageCreate(&#036;imgw, 15);
&#036;bgc = ImageColorAllocate(&#036;im, 255, 255, 255);
&#036;black = ImageColorAllocate(&#036;im, 0, 0, 0);
ImageFill(&#036;im, 0, 0, &#036;bgc);
ImageString(&#036;im, &#036;font, 3, 0, "Winamp : &#036;_GET[song]", &#036;black);
ImageLine(&#036;im, 0, 0, 0, 14, &#036;black);
ImageLine(&#036;im, 0, 0, &#036;imgb, 0, &#036;black);
ImageLine(&#036;im, &#036;imgb, 0, &#036;imgb, 14, &#036;black);
ImageLine(&#036;im, 0, 14, &#036;imgb, 14, &#036;black);
Imagepng(&#036;im, "song.png");
} else {
print "password error ";
}
?>

Continued...

internet.news
11-29-2003, 05:07 PM
before coming to this: you obviously need winamp 2.9 (2.x don&#39;t know, I have
2.9&#33;)

Usage
Get and install the DoSomething plugin for winamp:
http://www.oddsock.org/tools/dosomething/

Start Winamp. Go into Options->Preferences->Plug-ins->General Purpose. Click on DoSomething Plugin. Click the Configure button.
Of the six checkboxes at the top, check only the Enable ID3 Info Gathering checkbox. Uncheck all of the other five checkboxes.
Under the Actions drop-down box, click Submit a URL. In the URL textbox, cut and paste the following URL:
http://your.host/folder/up-png.php?song=%%...passwd=testpass (http://your.host/folder/up-png.php?song=%%URL_CURRENTSONG%%&passwd=testpass)
(remove the obvious spaces, forum kept truncating the url, grr)
URL Result File will be: c:&#092;programme&#092;abyss web server&#092;htdocs&#092;song.txt
Click the Add --&#62; button at the bottom right. Click the Ok button at the top right.
and all should be well.

You can now link to http://your.host/folder/song.png as an image and the song will be displayed.

Edit: Added extra quotes so that this should now work fine on windows as well

you find this tutorial also on the site of the guys who invented this script:
http://x-istence.com/forums/index.php?showtopic=167&st=0

have fun&#33; it is the image below my first blue song showing image&#33;

internet.news
11-29-2003, 10:12 PM
I hope it helps you ;)

internet.news
11-29-2003, 10:13 PM
why?

internet.news
11-29-2003, 10:13 PM
I don&#39;t know ...

I.am
11-30-2003, 11:35 PM
Originally posted by internet.news@29 November 2003 - 17:13
I don&#39;t know ...
thanks for sharing





dont spam <_<

balamm
12-01-2003, 12:24 AM
People spend enormous amounts of time and energy fighting spyware on their systems.
They bitch a blue streak at any thought of some program sending out info about them and their computer.
They run the best firewalls and install all the latest patches.
They avoid bundled freeware like the plague to avoid installing gator or ezulu. They delete cookies and install adblockers.
They clear their history and shred the evidence.

Then a few get some idea that someone else might actually give a shit what music they have playing on their spyware intensive media player. The one they overlook as an intrusion because it sounds 1337 to say you use it instead of wmp.

So now they install scripts that broadcast their player activity through an image or link from any site they post on.
And they still think someone might be interested.
They think not everyone has noticed it so they continue to post anywhere and everywhere,
even posting "hmmm... " and "interesting" when they have no more thoughts to share.



Sorry, I just had to share that.


And this >>


http://www.plus613.com/images/attentiongirl.jpg

I.am
12-01-2003, 12:30 AM
:lol: balamm, it is pretty understandable i have the same thoughts as well.

Btw, in the past i also posted a source code for a server side script to display client side ip(in Lounge). The only reason i did was because they were using viper&#39;s sig and u find everyone using it. So i just had to write my own code and circulate it for free although i dont use it myself :D

but this kind of stuff is annoying especially posting in here.

balamm
12-01-2003, 12:44 AM
I don&#39;t mind the IP sigs, at least they give me some information I might find usefull; how my proxy is doing for example.

"what i&#39;m listening to" , is about as interesting to me as

"what toothpaste I use"

or


"my last bowel movement occurred at.... "

:blink:

Idea for new sig strikes balamm :lol: :lol: :lol:

I.am
12-01-2003, 12:48 AM
:x :x :x

Marius24
12-01-2003, 12:49 AM
if u wanted this to work wouldn&#39;t you have to have the php thing turned on all the time which is a waste of RAM :huh:

Marius24
12-01-2003, 12:52 AM
Originally posted by balamm@30 November 2003 - 23:44
I don&#39;t mind the IP sigs, at least they give me some information I might find usefull; how my proxy is doing for example.

"what i&#39;m listening to" , is about as interesting to me as

"what toothpaste I use"

or


"my last bowel movement occurred at.... "

:blink:

Idea for new sig strikes balamm :lol: :lol: :lol:
:lol: :lol: :lol: :lol: :lol:

LTJBukem
12-01-2003, 01:17 AM
Erm. Aside from all the bitchiness, Winamp does not contain spyware.

balamm
12-01-2003, 02:21 AM
You&#39;re right, it&#39;s more direct than that. It actively reports all activity.