if i remove the .htaccess, it is fine.
but after adding .htaccess, it gives error. "authorization required".
one solution is that i have to move the file to be open out the web root and so it is also out of .htaccess protected folder.
are there any other solutions that will let me keep this file inside the .htacess protected folder and still can use fopen to open it.
thanks.