Please forgive me, no offense intended, but I think you may not be understanding the way job flows work with the RETS Server / PHP / your HTTP server OR your browser requests.
To try to simply state the basics:
PHP (running PHRETS on your server) should be making the requests, querying the RETS server, processing the results, then reporting to your browser or shell or whatever you are using to report the results of the entire processing after the script is run in it's entirety. In other words, your own server or desktop machine running php handles everything then you see the results. So the browser you are using has no direct connection to the RETS server.
If the rets server is identifying your browser as the user agent, then you've bypassed php and PHRETS altogether, which would explain the user agent setting being ignored..