> sorry in above code > $fp=fopen('filename.file','rb'); So it's problems of your code, as mentioned before. Reread mail from John until full understanding.