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 Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/ Share on other sites More sharing options...
dalecosp Posted September 24, 2013 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 ... 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 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! 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/ Link to comment https://forums.phpfreaks.com/topic/282424-nslookup-script-help-needed/#findComment-1451114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.