How can I export all defects with certain status from HP ALM using a PHP script?
If you are using REST API of HP QC, then command you should send during your session is something like:
GET https://qc-SERVER/qcbin/rest/domains/DOMAIN/projects/PROJECT/defects?query={status[open]}
In this case you will get all the defect in status OPEN. If you remove the query part, then it is possible to get all the defects under QC. If your projects has plenty of defects, then you should think to specify:
page-size=%d&start-index=%d
where %d are numbers to set how big can be the xml coming back (usually MAX=2000) and at which index you want to start.
Hope this solve your query! Have a nice day.