The Swedish Tower Posted July 22, 2008 Share Posted July 22, 2008 What I'm trying to do is that I was to code a link checker. It should sort out which url that belongs to the site and which that doesn't. The problem is that it doesn't do that. It just returns all urls as false. The valute of $url is http://www.towerdefence.net Code: if (stristr($url , 'towerdefence.net')) { check == "yes"; echo 'yesyesyyes'; } else { check == "no"; echo 'nonononon'; }; Link to comment https://forums.phpfreaks.com/topic/115993-solved-link-checker-returns-false/ Share on other sites More sharing options...
MadTechie Posted July 22, 2008 Share Posted July 22, 2008 <?php $url = "http://www.towerdefence.net"; if (stristr($url , 'towerdefence.net')) { $check = "yes"; //Added $ and removed a = echo 'yesyesyyes'; }else { $check = "no";//Added $ and removed a = echo 'nonononon'; } //Removed a ; ?> Link to comment https://forums.phpfreaks.com/topic/115993-solved-link-checker-returns-false/#findComment-596383 Share on other sites More sharing options...
The Swedish Tower Posted July 22, 2008 Author Share Posted July 22, 2008 Thanks Link to comment https://forums.phpfreaks.com/topic/115993-solved-link-checker-returns-false/#findComment-596387 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.