View previous topic :: View next topic |
Author |
Message |
Indian Smarty n00b
Joined: 03 Oct 2005 Posts: 2 Location: hamburg
|
Posted: Mon Oct 03, 2005 5:28 pm Post subject: pobieranie grafik z innej strony www |
|
|
Kod php pobierajacy miniatury stron www z katalogu : http://open.thumbshots.org Code: |
$url = "http://google.com";
$TheImage = "http://open.thumbshots.org/image.pxf?url=".$url."";
$size = getimagesize($TheImage);
if ($size[1]==90) {
}
else
{
} |
Jak takie cos wpakowac do szablonu ? |
|
Back to top |
|
human Smarty Rookie
Joined: 21 Oct 2005 Posts: 12 Location: Helldorado
|
Posted: Fri Oct 21, 2005 10:12 am Post subject: |
|
|
nie rozumiem problemu :]
no albo zapisujesz obrazke lokalnie i przekazujesz smartom jego nazwe/sciezke
albo w smartach w zwyklym htlmu <img src="i tu ten url"> powinno zalapac |
|
Back to top |
|
Indian Smarty n00b
Joined: 03 Oct 2005 Posts: 2 Location: hamburg
|
Posted: Sat Oct 22, 2005 3:17 am Post subject: |
|
|
Zeby zycie bylo takie proste . Grafika moze byc zrzutem strony www o wymiarach 120x90 (gdy strona jest w katalogu dmoz) , albo slepym gifem 1x1 lub 2x2 (gdy strony w katalogu niema) . Ja chce pobierac tylko te ktore maja 120x90 . |
|
Back to top |
|
human Smarty Rookie
Joined: 21 Oct 2005 Posts: 12 Location: Helldorado
|
Posted: Fri Oct 28, 2005 9:38 am Post subject: |
|
|
Indian wrote: | Zeby zycie bylo takie proste . Grafika moze byc zrzutem strony www o wymiarach 120x90 (gdy strona jest w katalogu dmoz) , albo slepym gifem 1x1 lub 2x2 (gdy strony w katalogu niema) . Ja chce pobierac tylko te ktore maja 120x90 . |
[php:1:cc852afb6b]<?
$size = getimagesize(''.$TheImage.'');
$width = $size[0];
$height = $size[1];
if ($width == 120 && $height == 90)
{
$smarty->assign('TheImage',''.$TheImage.'');
}
?>[/php:1:cc852afb6b]
na 1 rzut oka powinno cykac, ale nei wiem nie sprawdzalem ;P |
|
Back to top |
|
wojtek Smarty n00b
Joined: 06 Feb 2006 Posts: 1
|
Posted: Mon Feb 06, 2006 6:49 am Post subject: |
|
|
[php:1:96a03aa0b7]getimagesize(''.$TheImage.''); [/php:1:96a03aa0b7]?
"$TheImage" == $TheImage == ". $TheImage .";
Saluto! |
|
Back to top |
|
lmaniak Smarty n00b
Joined: 10 Jul 2008 Posts: 1
|
Posted: Thu Jul 10, 2008 12:14 am Post subject: |
|
|
Nie ma jeszcze innego sposobu? _________________ Polecam samochód lada: Lada |
|
Back to top |
|
ojciecimperator Smarty n00b
Joined: 30 Jul 2008 Posts: 1
|
Posted: Wed Jul 30, 2008 2:53 pm Post subject: |
|
|
Dołączam się do pytania powyższego kolegi. Próbowałem powyższe sposoby i nie działa.... _________________ wahacz audi a4 i inne części do audicy |
|
Back to top |
|
kar_ryn_89 Smarty n00b
Joined: 05 Aug 2008 Posts: 1
|
Posted: Thu Oct 30, 2008 10:24 am Post subject: |
|
|
Code: | <?
$size = getimagesize(''.$TheImage.'');
$width = $size[0];
$height = $size[1];
if ($width == 120 && $height == 90)
{
$smarty->assign('TheImage',''.$TheImage.'');
}
?> |
i tplu dajesz:
Code: |
<img src="{$TheImage}" alt="" />
|
Spróbuj tego. |
|
Back to top |
|
|