Code: Select all
http://xxx.xxx.xxx/answer_view.php?head=4Code: Select all
http://xxx.xxx.xxx/answer_view.php?head=4'Code: Select all
http://xxx.xxx.xxx/xxx.php?xxx=4aaaaaaCode: Select all
http://xxx.xxx.xxx/xxx.php?xxx=aaa4Moderator: General Moderators
Code: Select all
http://xxx.xxx.xxx/answer_view.php?head=4Code: Select all
http://xxx.xxx.xxx/answer_view.php?head=4'Code: Select all
http://xxx.xxx.xxx/xxx.php?xxx=4aaaaaaCode: Select all
http://xxx.xxx.xxx/xxx.php?xxx=aaa4Code: Select all
viewforum.php?f=1aaaCode: Select all
viewforum.php?f=aaa1Code: Select all
$_GET['id'] = abs(@intval($_GET['id']));
if(!$_GET['id'])
{
echo "Either you didn't specify an ID, or you attempted to use an invalid ID";
$h->endpage();
exit;
}
I'm not too sure but I'm a fan of str_replace()goldensparrow wrote:thank you very much for your replies jackpf and DaiLaughing , and i want to know which php function that be used in this case to strip characters (letters) ?
Code: Select all
$i = '345';
echo (int) $i; //should output 345
$i = '345aaa';
echo (int) $i; //should output 345 as well
$i = 'aaa345';
echo (int) $i; //should output 0