hmpargi
-
Content Count
3 -
Joined
-
Last visited
Posts posted by hmpargi
-
-
soory admins i dont no that to put referal is against rules..plz i say soory can u delet my referal link isaw in other topic where u warned 1 guy and find a button to edti but where is it? -
hi my self hardik
and i want to tell you some thing realy amazing....leapcash a site which realy pays i have been paid b them since 7months around 5000$ huge money join it and start earning now ... LeapcashNotice from serverph:referral link removed.
Need Help With This Ip Blocking Php Script!..
in Programming
Posted · Edited by moderator (see edit history) · Report reply
I got this code from this form.. from developer... who posted but he is nt replying me anything for any update so i like to do open discussion so it can make workable code.. please...
First of all when i setup everything correct..... while using admin: admin and password : password
and i hit login... nothing hppns stays same page, now when i enter ip and click yes to block i recievied this error "Could not Block Ip, MySql Error"
ok....
after this was nt working i went to mysql db and entered ip and time by manually in that table..
now i visited .. the ipadmin.php again.. now same problem.. except.. in blocked ip list... i can see the ip added. hence my db is working connected to ... now when i select 1 ip and try to remove.. again it doesnt do anything.. ip remains der..
please some1 try this code... its very easy .. but very useful...
and help me to fix the issue..
thank you
the First thing we are going to do is make the form that is actually blocking the site.
Note: You Must have this in a PHP file to work, it must be at the VERY TOP!!!!!
klist.php
The above just save it however you want to... I would recommend ipblochpbefore that works we need to create the table inside of a database that will have the
ip's stored inside of them
So in phpMyAdmin or your MySql Query Window type in
USE 'databasename';
Excute it...
CREATE TABLE blocked(
id int not null auto_increment primary key,
ip varchar(15),
added datetime);
Excute...
Now you are set up! Ok, Good Job on the MySql Database set up...
Now, we need to create a config file which will store how we are connecting and what database we are using
Then Your Done...
I would save this as config.php because thats what we imported into our ip checker file
(e.g. inlcude "config.php"; )
Ok, as I said you need to put this line of code on your first line after <?php or if you are using session_start();
after that
it's should like this
OK now save that above as ipadmin.php
Everything Should work succesfully any question