What’s the best way to open a URL feed in codeigniter? I’m assuming I can’t put the URL in a file upload input, so should I use a normal text input and then validate that the URL is not malicious? If so, what validation tests should I perform on the user inputted string? Would checking the file extension be enough or can this easily be manipulated?
Share
<input type="text" />to let users submit URLspreg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);