latemodern
06-04-2007, 06:48 PM
Hi,
I know there must be a simple way of doing this but I just can't find it. I am developing a system that allows users to upload word docs and download them. The upload script uses file_get_contents() to convert the file into a string and store it in a database for full text searching. The users never actually see the text - its just used to ascertain the relevance of the word doc before they download it.
The problem is that before and after the main text I'm getting random characters. Any ideas how I can strip these away? Example:
╨╧рб▒с����������������>��■ ���������������W����������Y������■ ����V��� ье┴� @ ��°┐�������������6!���bjbj0ж0ж������������������
I know there must be a simple way of doing this but I just can't find it. I am developing a system that allows users to upload word docs and download them. The upload script uses file_get_contents() to convert the file into a string and store it in a database for full text searching. The users never actually see the text - its just used to ascertain the relevance of the word doc before they download it.
The problem is that before and after the main text I'm getting random characters. Any ideas how I can strip these away? Example:
╨╧рб▒с����������������>��■ ���������������W����������Y������■ ����V��� ье┴� @ ��°┐�������������6!���bjbj0ж0ж������������������