Well I haven't been using php for very long now, but I've been trying to build a url input page. I need php to check that no illegal characters are being used. I dont know how I can make explode use several different characters.
this is the source that I have attempted this with:
$host = $_POST['whois'];
$suff = $_POST['suffix'];
$whois = $host . $suff;
$explode = explode ("|", $whois);
It's quite obvious that i need it to explode it at many more characters e.g.
-<>#%\,{}[]
I have tried many different things like putting "or" between them all
$char = "|" or " -" or "<" or ">" or "#" or "%" or "\"" or "," or "{" or "}" or "^" or "[" or "]";
$explode = explode ($char, $whois);
, but this didn't work. :mad: Nether did any of the other things that I tried.
O yes, i also tried
$parse = parse_url($whois);
$disp = $parse['host'];
to get no luck from it.
If anyone could help I would be very gatefull. 😃
Nick.