First of all, make absolutely sure you have to store the card details. If there is a possibility you can avoid it, then I would suggest you make every effort to do so. There are often card processing gateways that will allow you to process 'repeat transactions' whereby you supply the card details for the initial transaction and are then given a transaction ID to facilitate repeat transactions.
However if you cannot avoid the storage then you'll need to take the following points into account
As for Scans, there are many on-line PCI-DSS approved scanning vendors. These can be found on the approved scanning vendor pages on the PCI-DSS Website. I can quite heartily recommend Qualys. We use them and they are really easy to use and assist you in completion of the SAQ.
As for the PHP script, there are few requirements about how the code is developed in that your developers must adopt best practices and various standards of secure code development. There's also a raft of requirements with respect to the testing and production environment.
Development of scripts that deal with card data is covered by the requirements in 'Requirement 6: Develop and maintain secure systems and applications'
Storage of card data is covered by the requirements in 'Requirement 3: Protect stored card data'. However this section covers all forms of storage, e.g. paper receipts or electronic...
It's rather tricky to implement storage of card data however, since not only must the card data be encrypted, but also the key used to encrypt the data must be encrypted and the second key should be known only to two separate responsible persons. There are however ways around this since the 'spirit' of PCI DSS is to not only ensure absolute compliance, but in areas where compliance cannot be guaranteed, then there is enough auditing available so as to trace and attribute data access.
Some of the relevant sections in this regard are requirements 3.4 for card data storage, 3.6.6 for manual-key management and split-knowledge however there may be several others due to your environment, so I would heed you to read and understand the requirements and the testing procedure.
Unfortunately I can't link directly to the relevant sections of the PCI DSS standard since it's a PDF.
Finally, don't forget that PCI-DSS is not a "best-effort" standard. You must comply with every requirement in order to be in compliance of the card providers. Where you cannot meet requirements or they are not applicable you must either have compensating controls in place or must note the requirement as Not Application and explain why. The PCI-DSS is 'all or nothing'