i am uploading a string which has special characters
Example
$what = Fay King suggests ‘Miss Airheart’ as name for ‘Lady Lindy\'\"
<
Please ensure, that the page that uploads the string and the one that displays the string have the same text encoding, e.g. this one:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
In general, each page of your WebApp should have only and only one text encoding set.
have you tried a simple urlencode()?
http://php.net/manual/en/function.urlencode.php