Never thought of that...
Luckily, this function is gonna be held on a server for downloads only, 
and all the requests are gonna come straight from the 'master' site else 
where.
So I really shouldn't run into probs right now...
I will however lookinto making it that little bit more idiot proof after I 
finish on the current prob I'm on ;-)

Roll on Friday!






Curt Zirzow <[EMAIL PROTECTED]>
24/07/2003 17:29

 
        To:     [EMAIL PROTECTED]
        cc: 
        Subject:        Re: [PHP] removing parts of a string...


* Thus wrote [EMAIL PROTECTED] 
([EMAIL PROTECTED]):
> Cheers for your help...
> I did this in the end...
> 
>                 $rest = substr($row[file_info], 27, 100);
>                 $download = "/home/sites/site1/web$rest";
> 
> where $row[file_info]   =   the full URL and the 27th character is the 
> .com/ bit.

what if they use:
  http://mysite.com/download/file 
 
instead of:
  http://www.mysite.com/download/file

Your screwed!


If you don't want to use preg_match then look at strrchr.

Then of course what if they type:
  http://www.mysite.com/download/file?break=program

Are you safe from that too?

Make sure your safe in all conditions!


*********************************************************************
The information contained in this e-mail message is intended only for 
the personal and confidential use of the recipient(s) named above.  
If the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby 
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is 
strictly prohibited. If you have received this communication in error, 
please notify us immediately by e-mail, and delete the original message.
***********************************************************************

Reply via email to