Code: Select all
$nostretch = explode(" ", $_POST['stuff']);
foreach($nostretch as $word) {
if(strlen($word) > 66) {
if(strpos($word, '[url=') === 0) {
$word2 = explode(']', $word);
if (strlen($word[1]) > 70) {
error("Your post contained a string that exceeded the maximum allowed number of characters. Please avoid stretching the page.");
}
}
else {
error("Your post contained a string that exceeded the maximum allowed number of characters. Please avoid stretching the page.");
}
}
}
Any suggestions for a better method?