Reputation: 33956
I need to make a condition with PHP that checks if an image is called "forums.citrix.com" and returns true if it doesn't.
The image is displayed with this code:
<img style="padding:4px; width:16px;" src="http://getfavicon.appspot.com/http://<?php echo "$urlhost[0]"?> />
I don't know how to do it with php. Or maybe it has to be done with javascript. How could I do it?
Thanks
Upvotes: 0
Views: 127
Reputation: 48626
if ($urlhost[0] == 'forums.citrix.com')
return false;
else
return true;
Make sure that you sanitize the image file name if it's based on user input.
Upvotes: 2