Lamez Posted August 18, 2008 Share Posted August 18, 2008 I was wondering how would I go about making a external link checker? Where if the link is not on the "white list", then it ask the user if they want to continue. I know how to pull the "white list" from the db. But is there a function I could use? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/120138-external-link-checker/ Share on other sites More sharing options...
.josh Posted August 18, 2008 Share Posted August 18, 2008 If you know how to pull the list of links from the db then what are you asking to do? Have a comparison between the list and the link? Quote Link to comment https://forums.phpfreaks.com/topic/120138-external-link-checker/#findComment-618944 Share on other sites More sharing options...
Lamez Posted August 18, 2008 Author Share Posted August 18, 2008 ya after I posted that, I felt real dumb. I am sure I can figured it out on my own. Lol thanks anyway. Quote Link to comment https://forums.phpfreaks.com/topic/120138-external-link-checker/#findComment-618952 Share on other sites More sharing options...
.josh Posted August 18, 2008 Share Posted August 18, 2008 Well wait hold up. If I understand you correct, you have a db table and each row has a link and overall, that table is your whitelist, right? You don't need to check the whitelist in php. Just do something like this: $link = mysql_real_escape_string($_POST['linkcolumn']); $sql = "SELECT linkcolumn from whitelist where linkcolumn = '$link'"; $result = mysql_query($sql); if ($result) { // link is on the whitelist, do something } else { // link is not on whitelist, do something } Quote Link to comment https://forums.phpfreaks.com/topic/120138-external-link-checker/#findComment-618953 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.