Jump to content

php view image


ctcp

Recommended Posts

i got this script...

<?
$URL_parts = @parse_url ($row_DetailRS1['site_url']);
$DOMAIN = str_ireplace ("www.", "", $URL_parts['host']);
?>
<img src="image/site/<?if ( @is_file ("image/site/".$DOMAIN.".jpg" ) ){ echo $DOMAIN.".jpg"; }else{ echo "unknow.jpg"; }?>" alt="" width="270" height="173" /></p>

 

how to

in site_url colume i got links

http://www.google.gr/mplamplampla

http://www.phpfreaks.com/forums/index.php?action=post;board=1.0

http://www.gmail.com/mplamplampla

 

now.. if site_url find google.gr show google.gr.jpg

if find nothink show unknow.jpg

if find google.gr and phpfreaks.com

show google.gr.jpg and phpfreaks.com.jpg

 

 

thanks for help ..

 

 

Link to comment
https://forums.phpfreaks.com/topic/165056-php-view-image/
Share on other sites

Really basic explanation there.

 

if find google.gr and phpfreaks.com

show google.gr.jpg and phpfreaks.com.jpg

 

How exactly would this data look if both were found? How would you 'show' both, using 2 images? Do you *only* find google.gr / phpfreaks.com / gmail.com / nothing, or is the list endless? Need more information to help you.

Link to comment
https://forums.phpfreaks.com/topic/165056-php-view-image/#findComment-870380
Share on other sites

Well then you were on the right tracks before. Why doesn't it work at the moment? Remove the "@" suppressing the error, could explain why it's not working.

 

if find google.gr and phpfreaks.com

show google.gr.jpg and phpfreaks.com.jpg

 

I'm still at a loss as to this though, couldn't see anything similar on that website.

Link to comment
https://forums.phpfreaks.com/topic/165056-php-view-image/#findComment-870385
Share on other sites

look

i got 1) result page

      2) view page

in result page i display name

 

in view page display name and site_url

 

now in result page i whant display

name and image

image = site_url domain ..

 

<?php
$URL_parts = @parse_url ($row_DetailRS1['site_url']);
$DOMAIN = str_ireplace ("www.", "", $URL_parts['host']);
?>
<img src="image/site/<?if ( @is_file ("image/site/".$DOMAIN.".jpg" ) ){ echo $DOMAIN.".jpg"; }else{ echo "unknow.jpg"; }?>" alt="" width="270" height="173" /></p>

 

this working fine ... but if in site_url i got 2 links this script display only the first line

(script reading only the first line from colum site_url)

example

if i got in site_url

google.gr/mplampla  and  phpfreaks.com/forums/

this script will take google.gr.jpg

i whant now if site_url got

google.gr/mplampla

and phpfreaks.com/forums/

view google.gr.jpg

and phpfreaks.com.jpg

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/165056-php-view-image/#findComment-870388
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.