ukscotth Posted June 16, 2011 Share Posted June 16, 2011 Hi, Is there any way to get a users ip without using SSI or PHP ? I am trying to add a ban ip feature to a friends site but he only has access to an admin panel and can only edit the body part of his html page. Ive been googling for hours now and cant find a way Can anyone help ? Many thanks, Scott Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/ Share on other sites More sharing options...
requinix Posted June 16, 2011 Share Posted June 16, 2011 Not in any way that can't be easily circumvented. Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230754 Share on other sites More sharing options...
ukscotth Posted June 16, 2011 Author Share Posted June 16, 2011 Hi, Doesnt matter if its not 100% secure. Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230759 Share on other sites More sharing options...
cssfreakie Posted June 16, 2011 Share Posted June 16, 2011 They only thing i can think of is some sort of white list in a .htaccess file. Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230781 Share on other sites More sharing options...
ukscotth Posted June 16, 2011 Author Share Posted June 16, 2011 he doesnt have ftp access unfortunatly Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230788 Share on other sites More sharing options...
cssfreakie Posted June 16, 2011 Share Posted June 16, 2011 change host, not being able to do some basics is just mad. if he doesn't want to pay here is a free host: http://tinyurl.com/5n9jzc Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230789 Share on other sites More sharing options...
ukscotth Posted June 16, 2011 Author Share Posted June 16, 2011 Thanks but its a shopping type adult site that is all managed by the host so he wouldnt be able to simply move it unfortunatly. Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230794 Share on other sites More sharing options...
cssfreakie Posted June 16, 2011 Share Posted June 16, 2011 well than maybe with javascript but the people you don't allow must be stupid, for it to work http://www.google.nl/#sclient=psy&hl=en&source=hp&q=block+ip+with+javascript&aq=0j&aqi=g-j1&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=978abaf5f363ea15&biw=1280&bih=676 Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230799 Share on other sites More sharing options...
ukscotth Posted June 16, 2011 Author Share Posted June 16, 2011 Problem is all the javascript methods i have seen require SSI Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230801 Share on other sites More sharing options...
requinix Posted June 16, 2011 Share Posted June 16, 2011 The SSI is just to get the IP address - your JavaScript can get that information from another site's JavaScript (such as this thing). Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230807 Share on other sites More sharing options...
ukscotth Posted June 16, 2011 Author Share Posted June 16, 2011 That looks great. I only have access to the body, would it matter if I put all the code from that site into the body instead of the head ? Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230810 Share on other sites More sharing options...
requinix Posted June 16, 2011 Share Posted June 16, 2011 Quote That looks great. I only have access to the body, would it matter if I put all the code from that site into the body instead of the head ? With that SmartIp.onload, no it doesn't matter. Can't you get the host to implement IP banning? Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230820 Share on other sites More sharing options...
ukscotth Posted June 16, 2011 Author Share Posted June 16, 2011 The host wont help him at all, its a bit of a rubbish service he's using but he seems to like it lol. But thanks very much for your help its working great now, its most appreciated Link to comment https://forums.phpfreaks.com/topic/239584-any-way-to-get-users-ip-without-ssi/#findComment-1230837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.