1mher3 Posted January 19, 2007 Report Share Posted January 19, 2007 sveiki, es taa teikt, iesaaceejs, maacos programmeet PHP. jau paaris stunadas, mekeeju pa googlee un php.net funkcijaam, taa ar nekas nesanaak... esu aizkeeries pie shaadas probleemas: kods <img src="http://adrese.lv/logo.php?user=<id>"> vajag panaakt lai shitais kods paraada animeetu gif bildi. logo.php atkariibaa no id veertiibas un noteiktiem parametriem izveelas vajadziigo bildi... tik taalu viss straadaa... piem. if ($picture=="1") { jaaparaada http://adrese.lv/logo/pirmais.gif } if ($picture=="2") { jaaparaada http://adrese.lv/logo/otrais.gif } kaadu komandu jaalieto, lai tas straadaatu? jau ieprieksh paldies. Link to comment Share on other sites More sharing options...
Val Posted January 19, 2007 Report Share Posted January 19, 2007 Kautkā kreisi tev tas viss iecerēts. ja picture=1971, tad attēla adrese būs http://adrese.lv/logo/tuukstotsdevinjisimt...desmitviens.gif ? Link to comment Share on other sites More sharing options...
andrisp Posted January 19, 2007 Report Share Posted January 19, 2007 http://lv2.php.net/manual/en/function.imagejpeg.php Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 19, 2007 Report Share Posted January 19, 2007 andrisp --> kaads sakars tam visam ar imagejpeg() ??? (kautgan preciiza atbilde uz uzdoto jautaajumu ;) ) 1mher3 --> mjaa ..... <?php if ($picture=="2") { ?> <img src="http://adrese.lv/logo/otrais.gif" > <?php } Visparastaakais HTML !!!! vai arii ja bildes ir numureets VAI galaa/sakumaa ir numurs tad if ($picture=="2") { echo '<img src="http://adrese.lv/logo/'.$picture.'.gif" >'; // VAI echo '<img src="http://adrese.lv/logo/bildeaa_nr_'.$picture.'.gif" >'; } Link to comment Share on other sites More sharing options...
1mher3 Posted January 19, 2007 Author Report Share Posted January 19, 2007 to Grey_Wolf, paldies. shis risinaajums dereetu ja to kodu liktu savaa lapaa, bet tur savaadaak domaats. tas kods ir prieksh lietotaajiem. piemeeram: lietotaajam tiks iedots shaads kods kuru ievietot savaa web lapaa. <a href="http://www.adrese.lv/enter.php?user=123"><img src="http://adrese.lv/logo-picture.php?user=123"></a> jaauztaisa ka, tas logo-picture.php fails izveelaas (taa dala man straadaa) un "ieliek" dotaa lietotaaja reitingam atbilstoshu bildi ar echo funkciju tas triks nesanaaca. iepreiksh bij statisks gif un reitings rakstiijaas tekta veidaa izmantojot imagecreatefromgif funkciju, tagad jauni - animeeti logo, bet tos ar imagecreatefromgif funciju nevar izmantot (panem tik pirmo kadru). Link to comment Share on other sites More sharing options...
1mher3 Posted January 19, 2007 Author Report Share Posted January 19, 2007 :D peec ilgas mekleeshanas beidzot atradu... <? header("Content-type: image/gif"); readfile("http://adrese.lv/logo/pirmais.gif"); ?> tik elementaari ... es gan ir dums Link to comment Share on other sites More sharing options...
Recommended Posts