simon26r Posted September 24, 2013 Share Posted September 24, 2013 Hello We are trying to capture and display on our website if a users connected or not to our dns filter we need this to compare the true nslookup with one produced by our dns This is the latest code thet dose not work $ip = gethostbyname('www.facebook.com'); if ($ip == '46.123.70.198'); { //this is the ns after dns filter for facebook.com echo "Smart DNS Is Set up "; } elseif ($ip == '193.123.9.65'): //this is true ns lookup echo "Smart DNS Is Not Set UP"; the error is T_ELSEIF on line 4 T_ELSEIF on line 4 If anyone can guide us it would be a great help or if you need not info Thanks Quote Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/ Share on other sites More sharing options...
Solution dalecosp Posted September 24, 2013 Solution Share Posted September 24, 2013 Rather a mess with your brackets there!Is this better? $ip = gethostbyname('www.facebook.com'); if ($ip == '46.123.70.198') { //this is the ns after dns filter for facebook.com echo "Smart DNS Is Set up "; } elseif ($ip == '193.123.9.65') { //this is true ns lookup echo "Smart DNS Is Not Set UP"; } Not sure where those extra semicolons and colons came from ... Quote Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/#findComment-1451106 Share on other sites More sharing options...
simon26r Posted September 24, 2013 Author Share Posted September 24, 2013 thank you Quote Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/#findComment-1451110 Share on other sites More sharing options...
dalecosp Posted September 24, 2013 Share Posted September 24, 2013 You're welcome! Quote Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/#findComment-1451112 Share on other sites More sharing options...
AbraCadaver Posted September 24, 2013 Share Posted September 24, 2013 Hello We are trying to capture and display on our website if a users connected or not to our dns filter we need this to compare the true nslookup with one produced by our dns This is the latest code thet dose not work $ip = gethostbyname('www.facebook.com'); if ($ip == '46.123.70.198'); { //this is the ns after dns filter for facebook.com echo "Smart DNS Is Set up "; } elseif ($ip == '193.123.9.65'): //this is true ns lookup echo "Smart DNS Is Not Set UP"; the error is T_ELSEIF on line 4 T_ELSEIF on line 4 If anyone can guide us it would be a great help or if you need not info Thanks Might want to pay attention to other posts that you have made: http://forums.phpfreaks.com/topic/282391-whats-wrong-with-my-code/ Quote Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/#findComment-1451114 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.