Witam!
Mam taki oto kodzik:
<?
$zrodlo = file_get_contents('http://4story.pl/lexicon/charinfo/'.$_GET['nick'].'/1'); $klasa = file_get_contents('http://4story.pl/talentplaner/planer/0/0/'.$_GET['nick'].'/1');
#wyciŚganie lvl
preg_match('|<div class="char_level">([0-9]{0,15})|', $zrodlo, $nick);
#wyci¦ganie hp
preg_match('|<div class="char_hp">([0-9]{0,6})|', $zrodlo, $hp);
#wyciaganie liczby godzin
preg_match('|<div class="char_portrait">([a-zA-Z0-9]{0,30})|', $zrodlo, $dni);
$obrazek=imagecreatefromjpeg('tlo.jpg');
$link = imagecreatefromjpeg($dni);
$font = 'visitor2.ttf';
$kolor=ImageColorAllocate($obrazek,0, 0, 0); //definiuje kolor
ImageTTFText($obrazek,20,0,60,30,$kolor,'visitor2.ttf',$nick[1].''); //wypisuje text [wielkoťŠ, nachylenie, po-o¬enie]
ImageTTFText($obrazek,10,0,10,10,$kolor,'visitor2.ttf',$_GET['nick'].''); //wypisuje text [wielkoťŠ, nachylenie, po-o¬enie]
ImageTTFText($obrazek,10,0,20,10,$kolor,'visitor2.ttf',$hp[1].''); //wypisuje text [wielkoťŠ, nachylenie, po-o¬enie]
imagecopy($obrazek, $link, 8, 8, 0, 0, 38, 38);
ImageTTFText($obrazek,10,0,30,10,$kolor,'visitor2.ttf',$hp[1].''); //wypisuje text [wielkoťŠ, nachylenie, po-o¬enie]
Header("Content-type: image/jpeg"); ImageJpeg($obrazek,NULL,100);
ImageDestroy($obrazek);
?>
wydaje mi się, że wszystko jest dobrze. Chciałbym wyświetlić to, co wyciągnie to:
preg_match('|<div class="char_portrait">([a-zA-Z0-9]{0,30})|', $zrodlo, $dni);
na obrazku, obojętnie gdzie. Jakieś propozycje?
Mam takie oto błędy:
Warning
: imagecreatefromjpeg
(Array) [function.imagecreatefromjpeg
]: failed to open stream
: No such
file or directory in
/home
/windstar
/domains
/domena
/public_html
/ac
.php on line 18
Warning: imagecopy(): supplied argument is not a valid Image resource in /home/windstar/domains/domena/public_html/ac.php on line 30
Warning
: Cannot modify
header information
- headers already sent by
(output started at
/home
/windstar
/domains
/domena
/public_html
/ac
.php
:18) in
/home
/windstar
/domains
/domena
/public_html
/ac
.php on line
34
Od razu mówią, ze to moja 1 styczność z imagecopy.
I nie wiem jak to zrobić, żeby wszystkie łądnie banglało. Proszę Was o szybką pomoc!
Pozdrawiam