I have just sat, and passed, another mock exam for the Zend PHP certification. The following questions came up in the test and I wondered if anyone would be able to help me out in obtaining the answers and the reasons (if possible). :-)
What is the best measure one can take to prevent a cross-site request forgery?
- Disallow requests from outside hosts
- Add a secret token to all form submissions
- Turn off allow_url_fopen in php.ini
- Filter all output
- Filter all input
============================================
Using flock() to lock a stream is only assured to work under what circumstances?
- When running in a Linux environment local filesystem
- When accessing the stream of the local filesystem
- When running in a Windows environment and accessing a share
- When accessing a bi-directional stream
- When accessing a read-only stream
==========================================
In databases that do not support the AUTO_INCREMENT modifier, you must use a _________ instead to auto-generate a numeric incrementing key
==========================================
Many Thanks,
Picco
