actually, my htaccess was blocking something but even when i change htaccess and put a sstandard one the script does not work and i get
Okay, the generic .htaccess is probably not creating the .xml file while the non-generic .htaccess is likely blocking the standard PHP user-agent, so let's try setting the user-agent to something that shouldn't be blocked and using the custom .htaccess file.
ini_set('user_agent', 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)');
# This will open the actual xml page on your site with
# PHP and store the info in a variable. [Obviously you
# Have to change the location to the URL of the actual
# XML page people view.]
# Then you can save the file info where ever you would like.
# For this one you'll have to find your server path which is
# usually something like /home/public_html/the-directory-to-use