so, und noch ein problem...
also folgendes:
ich hab aufm server nen kleines php-script laufen, welches das aktuelle winamp-lied als .png-bild ausgibt. das bild wird mittels einer .php-datei gemacht.
das script sieht folgendermaßen aus:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
<?php
$song = $_GET[song];
$filename = 'winamp.txt';
$chars = 300;
// text in Picture
$text = "Ich höre...";
$text2 = "www.Eihwaz-Horizont.de";
// check if Info Sender is calling the script
if(isset($_GET[song])) {
// check if text file is writeable
if(is_writable($filename)) {
// check if we can open the text file
if(!$handle = fopen($filename, 'w')) {
print "Cannot open file ($filename)";
exit;
}
// check if we can wite to the text file
if(!fwrite($handle, stripslashes($song))) {
print "Cannot write to file ($filename)";
exit;
}
// close the door behind you
fclose($handle);
}
} else {
// grab song title from text file
$songname = @implode('',@file($filename));
//new Edit PNG-Output
// replace german special character
$songname = ereg_replace("Ä","Ä",$songname);
$songname = ereg_replace("ä","ä",$songname);
$songname = ereg_replace("Ö","Ö",$songname);
$songname = ereg_replace("ö","ö",$songname);
$songname = ereg_replace("Ü","Ü",$songname);
$songname = ereg_replace("ü","ü",$songname);
$songname = ereg_replace("ß","ß",$songname);
// short the Songtext to 300 Characters
if(strlen($songname) > $chars) {
$songname = substr($songname,0,$chars);
$songname .= "...";
}
//read Create-date of winamp.txt
if (file_exists($filename))
{
$time = date("j.m.Y H:i", filectime($filename));
}
//now we build the png with the Songtext
Header("Content-type: image/png");
$im = ImageCreateFromPng("button.png");
$color = ImageColorAllocate($im, 0, 0, 0);
$color2 = ImageColorAllocate($im, 0, 0, 0);
ImageString($im,1,5,31,$time,$color);
ImageString($im,2,5,3,$text,$color);
ImageString($im,2,10,17,$songname,$color);
ImageString($im,1,350,31,$text2,$color2);
ImagePng($im);
ImageDestroy($im);
}
//end new Edit PNG-Output
?>
|
wie man erkennt, liest das script den lied-titel aus der winamp.txt auf dem server. soweit kein problem, klappt(e) alles super.
heute wird mir gesagt, dass kein bild mehr angezeigt wird. ok, hab ich selber getestet, es stimmt... kein bild :-/ um auszuschließen, dass fehler im script sind, hab ich das transparente bild gegen ein nicht-transparentes getauscht... siehe da, es klappte wieder. wieder ein transparentes hochgeladen -> klappt nicht...
das komische ist, dass genau dasselbe script mit genau dem gleichen bild bis gestern ohne probleme gelaufen ist...
vielleicht hat ja jemand von euch eine idee, wieso das script von gestern auf heute nicht mehr vernünftig klappt...
wie gesagt, am script wurde nichts geändert, genauso wurde nichts am bild verändert.
die verschiedenen versuche bzw. beispiele, was ich mein:
klappt nicht
klappt
(die einzigen unterschiede in den beiden scripts liegt an der png-datei... button.png bzw. button2.png)
die winamp.txt klappt auch so, wie sie es soll (
link)
das script stammt von:
| Scriptname : Info Sender's PHP Sidekick v3 PNG-Output
| Taken From : appel@nr78.net
| Updated By : Sami Khan - sukhan@ucalgary.ca (v2)
| Updates By : Patrick aka Tutti patrick@pc-mind.de (v3)
| Website : http://www.pc-mind.de
| License : GPL'd (by Sami ?? ;- ) )
über hilfe wäre ich sehr dankbar ;D