Jump to content

RickyF

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

RickyF's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I know, i think its stupid too lol, but people seem to want the feature for some reason.
  2. Warning: in_array() [function.in-array]: Wrong datatype for second argument on line 12 Your ip is banned! $bannedurls = "web1.com,web2.com,web3.com";
  3. Thanks for the script, will try it in a sec. I know things can be bypassed, but the script needs a form of IP banning, i think its a pointless feature too, but its been requested so....
  4. Hi, the ban ips part is working fine, its just the web url banning that isnt working fully as explained, if site.com was banned by the script, and some one tried posting www.site.com it would let them, the script needs to check if anything like site.com is posted, e.g. *site.com*, meaning anything.site.com or www.site.com etc should also be banned.
  5. Sorry i think i have confused you. I need the script to be able to ban a website in full, e.g. if i banned site.com, the script should ban any thing with site.com in it, this script doesn't do this, this is why i used eregi in an earlier post to you. Thanks Heres what i currently have: $bannedurls = "website1.com,website2.com,website3.com"; $sites = explode(",", $bannedurls); if (in_array("$bannedurls", $sites)){ die ("Your website is banned!"); }
  6. Thanks, working, is there a way to make it so that spaces after commas dont stop the validation from working? $var = "1,2,3"; works $var = "1, 2, 3"; doesnt
  7. $bannedurls = "whatever.com"; $urls = explode(",", $bannedurls); if (in_array("$bannedurls", $urls)){ die ("Your website is banned!"); } This is different, as its part of a form, weburl is the input field being checked. The script needs to ban *whatever.com*, not just whatever.com as people can bypass with www.whater.com or whatever.com/ etc Thanks
  8. Similarly, how would i make it so that anything in $bannedurls stops the post being made? $bannedurls = "1.com, 2.com, 3.com"; The var for the what the domains are, is $weburl, $weburl would be something like www.site.com $bannedurls = "1.com, 2.com, 3.com"; if (in_array(eregi("$bannedurls", $weburl)) { die ("Your website has been banned."); } I think it would be something like this.
  9. Thanks a lot!
  10. Hi, Ok so i have config.php, in this i need a var to be set as $bannedips and in index.php the banned ips need to be collected from config.php and if the IP is banned a die error should show I need it so that $bannedips is on like this: $bannedips = "1.1.1.1, 2.2.2.2, 3.3.3.3"; If its possible to do this not using quotes on each ip this would be useful, most essentially the ips need to be on one line seperated by a comma. Using php 4.4.7 Thanks for any help!
  11. A script i have already used in my script already does this i just realised! http://www.phpclasses.org/browse/file/10982.html It creates a time stamp, and then checks each time the db is accessed if the time stamp is expired, if it is it deletes the rows that are expired. Could some one help out with something that does this, the code is in the script above, just needs to be fiddled around with a bit.
  12. I dont really have crons in mind, how much would be involved in making this work through php/mysql? What sortof script size etc?
  13. Oh really, i thought you could "limit" the mysql table, so that only 20 records could be in the table at any one time, and when new data was inputted the 20th row would be removed then the new new data would be first etc.
  14. Heres part of my script that gets the mysql data: $db = mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbname) or die(mysql_error()); mysql_query("INSERT INTO plugboard(imageurl,weburl,date,ip) VALUES('$imageurl','$weburl','$date','$ip')"); } } $db = mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbname) or die(mysql_error()); $query = "SELECT * FROM plugboard ORDER BY id DESC LIMIT 20"; $result = mysql_query($query);
  15. Still on php 4.4.7, heh. Well, 20 rows are shown, but theres still rows in the table that exist but arent being shown, this will make the database huge over time, so theres no point in making the database hold more then 20 rows - or records whatever you want to call them.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.