Sliipeetais Posted July 26, 2004 Report Share Posted July 26, 2004 (edited) Man ir ar GD ģenerēta bilde. Es vēlos zināt hostname lapai, kas šo bildi ielādē. Vai tas ir iespējams? Kā? Edited July 26, 2004 by Sliipeetais Link to comment Share on other sites More sharing options...
Venom Posted July 26, 2004 Report Share Posted July 26, 2004 echo '<pre>'.print_r($_SERVER).'</pre>'; Link to comment Share on other sites More sharing options...
Sliipeetais Posted July 26, 2004 Author Report Share Posted July 26, 2004 (edited) Milzumlielais paldies! PAPILDINĀTS Un tomēr es neko nesaprotu... kurš ir tas mistiskais mainīgais, kas parāda to, kas ielādē manu bildi? Edited July 26, 2004 by Sliipeetais Link to comment Share on other sites More sharing options...
DimanC Posted July 26, 2004 Report Share Posted July 26, 2004 offtopic: what stands for GD ģenerēta bilde? Link to comment Share on other sites More sharing options...
Sliipeetais Posted July 26, 2004 Author Report Share Posted July 26, 2004 Patiesībā, tam nav nozīme kā ģenerēta. Link to comment Share on other sites More sharing options...
DimanC Posted July 26, 2004 Report Share Posted July 26, 2004 nu to es saprotu, ka nav nozīmes... :D bet vienalga - ko biji domāji ar GD? Link to comment Share on other sites More sharing options...
Sliipeetais Posted July 26, 2004 Author Report Share Posted July 26, 2004 GD grafisko bibliotēku. Link to comment Share on other sites More sharing options...
Sliipeetais Posted July 26, 2004 Author Report Share Posted July 26, 2004 Šķiet, es nepareizi raksturoju problēmu. Ideja - uz mana servera stāv bilde. Es vēlos panākt, ka varu uzzināt tās adreses, kas manu bildīti linko (ievieto savā lapā, taču patiesībā ņem no mana servera). Link to comment Share on other sites More sharing options...
Venom Posted July 26, 2004 Report Share Posted July 26, 2004 offtopic: what stands for GD ģenerēta bilde? GD stands for Graphic Design library/module for php (see php.ini extensions section for php_gd(2?).(dll|so)) It has capabilities to manipulate images not just like binary files, but also to create such using canvas-like drawing operations. See http://www.boutell.com/gd/ for more info & download. Link to comment Share on other sites More sharing options...
bubu Posted July 26, 2004 Report Share Posted July 26, 2004 Šķiet, es nepareizi raksturoju problēmu. Ideja - uz mana servera stāv bilde. Es vēlos panākt, ka varu uzzināt tās adreses, kas manu bildīti linko (ievieto savā lapā, taču patiesībā ņem no mana servera). HTTP servera log failos noteikti vajadzētu (ja nav atslēgts) rakstīties infai, kur uzrādās pieprasītie faili un kas tos pieprasījis. Link to comment Share on other sites More sharing options...
Sliipeetais Posted July 26, 2004 Author Report Share Posted July 26, 2004 (edited) Pieņemsim, ka man nav pieejami servera log'i. Man tas jāpanāk ar PHP. Kā? Edited July 26, 2004 by Sliipeetais Link to comment Share on other sites More sharing options...
Venom Posted July 26, 2004 Report Share Posted July 26, 2004 (edited) ignore buggy post Edited July 26, 2004 by Venom Link to comment Share on other sites More sharing options...
Venom Posted July 26, 2004 Report Share Posted July 26, 2004 echo '<pre>'.print_r($_SERVER).'</pre>'; lai liegtu pieeju bildēm: $opt['dom_allow']=array('www.ofmy.info','121.0.0.1');//array of domains to allow executing from if (!in_array($_SERVER['HTTP_HOST'],$opt['dom_allow'])) { //dissalow hotlinking if ($_SERVER['HTTP_REFERER'] && strpos($_SERVER['HTTP_REFERER'],$_SERVER['SERVER_NAME'])===false) exit; if (strpos($_SERVER['HTTP_HOST'],$_SERVER['SERVER_NAME'])===false) exit; } .htaccess: <Directory "kur/stāv/bildes/"> Order deny,allow Allow from tava_servera_ip </Directory> Link to comment Share on other sites More sharing options...
Venom Posted July 26, 2004 Report Share Posted July 26, 2004 $opt['dom_allow']=array('www.ofmy.info','121.0.0.1');//array of do Link to comment Share on other sites More sharing options...
Sliipeetais Posted July 26, 2004 Author Report Share Posted July 26, 2004 OK, šķiet, es vēl neesmu tik gudrs, lai to saprastu. Rezultāts, kuru es vēlējos panākt, bija, ka uz attēla (ģenerēts ar GD) ir teksts, ar adresi, kas šo attēlu ielādējusi. Piem. kāds manu bildi hotlinko no www.navtadasadreses.lv un uz bildes parādās www.navtadasadreses.lv. Link to comment Share on other sites More sharing options...
Recommended Posts