Offline Access to Google and other OAuth based API – PHP OAuth API – Part 2
Retrieving Access Tokens from a MySQL database The database_oauth_client_class is just a generic SQL database storage class. It really does not execute SQL queries because that depends on the type of database you want to store your tokens. A more specialized sub-class is necessary to execute the SQL queries to a specific type of database. This package also comes with another sub-class named mysqli_oauth_client_class that is specialized in executing the SQL queries to a MySQL database using the mysqli extension. If you use a different type of database, you can use this sub-class as model to execute SQL queries using the appropriate PHP extension. Lets see how you can make this work in practice to make the tokens be stored and retrieved in a MySQL database. The first thing you…