Below are snippets for SecondV.
5
This class implements a simple template engine that works by replacing text.
It can read a template file into a string. Then it searches and replaces all occurrences of the template place holder marks with the values of one or more template arguments.
It can read a template file into a string. Then it searches and replaces all occurrences of the template place holder marks with the values of one or more template arguments.
6
This class is a MySQL database access wrapper. It can:
- Connect to a MySQL server
- Execute SQL queries and retrieve single value results or return result rows into arrays
- Return the last inserted table row identifier, the number of result rows and the number of affected rows
- Count the number of executed queries
- Lock and unlock tables
- Escape text literal values or like patterns
- Retrieve database access errors
- Connect to a MySQL server
- Execute SQL queries and retrieve single value results or return result rows into arrays
- Return the last inserted table row identifier, the number of result rows and the number of affected rows
- Count the number of executed queries
- Lock and unlock tables
- Escape text literal values or like patterns
- Retrieve database access errors
7
This class can be used to retrieve the search words entered by an user in a search engine site that lead the user to the current page.
The class can parse the HTTP_REFERER variable if present. Then it can detect which search engine site lead the user to the current page, and extract the search words.
Currently the following engines are supported:
- Google
- Yahoo
- MSN
- AllTheWeb
- LookSmart
- AskJeeves
The class can parse the HTTP_REFERER variable if present. Then it can detect which search engine site lead the user to the current page, and extract the search words.
Currently the following engines are supported:
- Yahoo
- MSN
- AllTheWeb
- LookSmart
- AskJeeves
10
This simple function will check if a url is valid (going by parse_url()) and if it's 'online' - by seeing if it returns a 302, 301, or 200 status code.
5
This small snippet will not allow _POST requests from a 'foreign' domain. It relies on the HTTP_REFERER variable.
7
This function will reverse the affects of register_globals









