Your whole approach seems to be more suited for a scripting language. Do you normally use PHP, by the way? Anyway, take a look at class org.opencms.util.CmsFileUtil. I haven't used it myself, but it should be possible to put those connection parameters into a text file in the RFS and access them via CmsFileUtil's methods. Robert