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.
<?php
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.]
$olx=file_get_contents('http:
//www.mysite.com.br/index.php?option=com_source&format=xml&feed=olx');
# 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
file_put_contents('/home/mypath/mysite.com.br/xml/olx.xml',$olx);
?>