Guest Null Posted January 8, 2010 Posted January 8, 2010 Can anyone give me an example of how i would do a whitelist array? Thanks :) Quote
rulerofzu Posted January 8, 2010 Posted January 8, 2010 http://www.w3schools.com/PHP/php_ref_array.asp Quote
Guest Null Posted January 8, 2010 Posted January 8, 2010 I know what an array is... Im just wondering how exactly i would go about doing it in mccodes such as for the url restrictments and stuff. Quote
Guest Null Posted January 8, 2010 Posted January 8, 2010 Seriously this is pissing me off. I offer my help to anyone who asks and when i have a question, noone could give a damn to answer it. Quote
rulerofzu Posted January 8, 2010 Posted January 8, 2010 LOL keep ye hair on. How does anyone know what you are intending to do with so little info? Quote
Dayo Posted January 8, 2010 Posted January 8, 2010 This is what you want isnt it Action restrictions <?php $allowed = array('1', '2', '3', '4', '5'); if (!in_array($_GET['action'], $allowed)) { echo 'This is not allowed!'; exit; } ?> for url restrictments $allowed = array('http://www.google.co.uk', 'http://www.test.com', 'http://www.duno.com', 'http://www.nowimrelistuckwhattoput.com', 'http://www.cddesigns.org :D'); $url= explode('.', $_POST['URL']) if (!in_array($url[1], $allowed)) { echo 'This URL not allowed!'; exit; } ?> PLEASE NOT THESE ARE NOT TESTED!!! this is just something to base your code on ... Quote
Guest Null Posted January 8, 2010 Posted January 8, 2010 Thank you. Atleast not everyone ignores ppl when they need help Quote
Dayo Posted January 8, 2010 Posted January 8, 2010 No problem mate i would of replyed earlier but i was at work on my phone so its a bit hard to code :P ... is that what the sorta thing you was looking for? Quote
Guest Null Posted January 8, 2010 Posted January 8, 2010 Yea pretty much, i was just wondering about how to check the url data as well as the whole page. Quote
Zero-Affect Posted January 9, 2010 Posted January 9, 2010 disco-mod It's called searching i only posted that like yesterday, it's so much easier to look before you post. Quote
AlabamaHit Posted January 10, 2010 Posted January 10, 2010 Dude your a tool I can tell that just by this one topic. You posted and 2 hours later expect EVERYONE on the site to be online to help??? wtf honestly. I will never help you or anyone that acts like that. You ask for help you WAIT for someone to help. Don't come back and bitch about it an 2 hours later. Quote
CrazyT Posted January 11, 2010 Posted January 11, 2010 This is what you want isnt it Action restrictions <?php $allowed = array('1', '2', '3', '4', '5'); if (!in_array($_GET['action'], $allowed)) { echo 'This is not allowed!'; exit; } ?> for url restrictments $allowed = array('http://www.google.co.uk', 'http://www.test.com', 'http://www.duno.com', 'http://www.nowimrelistuckwhattoput.com', 'http://www.cddesigns.org :D'); $url= explode('.', $_POST['URL']) if (!in_array($url[1], $allowed)) { echo 'This URL not allowed!'; exit; } ?> PLEASE NOT THESE ARE NOT TESTED!!! this is just something to base your code on ... Doesn't look like a while list array to me.... Quote
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.