You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
3.7 KiB
83 lines
3.7 KiB
= PHP
|
|
:navtitle: PHP
|
|
:description: PHP
|
|
:keywords: tinydrive, PHP
|
|
|
|
[[tiny-drive-php-starter-project]]
|
|
== Tiny Drive PHP Starter Project
|
|
|
|
This project will help you get started with {cloudfilemanager} and allow you to play around with its features.
|
|
|
|
=== Requirements
|
|
|
|
Before you start your journey with {cloudfilemanager}, it will go a lot smoother if you have done these steps:
|
|
|
|
. Login/register to link:{accountpageurl}[{accountpage}]
|
|
. Get a link:{accountkeyurl}[{cloudname} API Key]
|
|
. Get a link:{accountjwturl}[JWT Key]
|
|
|
|
Store the keys temporarily somewhere as you will need to copy & paste them later.
|
|
|
|
=== Prerequisites
|
|
|
|
* PHP 7.0+ on any supported platform.
|
|
|
|
=== Procedure
|
|
|
|
These are the steps needed to get this project running on your machine:
|
|
|
|
[[clone-this-repo-to-your-local-machine-using]]
|
|
==== 1. Clone this repo to your local machine using
|
|
|
|
[source,sh]
|
|
----
|
|
$ git clone git@github.com:tinymce/tinydrive-php-starter.git
|
|
----
|
|
|
|
[[change-the-apikey-in-tinydrive-php-starterconfigphp]]
|
|
==== 2. Change the `+apiKey+` in `+tinydrive-php-starter/config.php+`
|
|
|
|
You get the API key from the `+API Key Manager+` {accountpage} page at http://tiny.cloud.
|
|
|
|
[[create-a-tinydrive-php-starterprivatekey-file-containing-your-generated-private-rsa-key]]
|
|
==== 3. Create a `+tinydrive-php-starter/private.key+` file containing your generated private RSA key
|
|
|
|
You get the private RSA key from the `+JWT Key Manager+` {accountpage} page at http://tiny.cloud.
|
|
|
|
[[go-to-the-directory-and-start-the-dev-server]]
|
|
==== 4. Go to the directory and start the dev server
|
|
|
|
[source,sh]
|
|
----
|
|
$ cd tinydrive-php-starter
|
|
$ php -S localhost:3000
|
|
----
|
|
|
|
[[open-the-example-project-at-httplocalhost3000]]
|
|
==== 5. Open the example project at http://localhost:3000
|
|
|
|
== Implementing with your system
|
|
|
|
If your specific use case has not been covered by any of the sample xref:tinydrive-dotnet.adoc[dot net], xref:tinydrive-java.adoc[java], xref:tinydrive-nodejs.adoc[nodejs], or xref:tinydrive-php.adoc[php] starter projects, some customizations might be required to be applied to implement {cloudfilemanager} in the specific system. The xref:tinydrive-jwt-authentication.adoc[JSON Web Token] authentication solution would have to be tied to the login authentication of your system. This usually means integrating the JWT authentication to the existing session authentication so that users automatically login to {cloudfilemanager} and your system.
|
|
|
|
=== Additional resources
|
|
|
|
Go through the following additional resources to figure out how to configure {cloudfilemanager} with your system.
|
|
|
|
* We recommend reading up and trying to understand how xref:tinydrive-jwt-authentication.adoc[JWT authentication] works. In order to implement {cloudfilemanager} you need prior knowledge of JWT in detail, including how they can be used for user authentication and session management in a web application. There will be some coding involved on both the client-side and the server-side to configure JWT as per the instructions in this section.
|
|
* Starter projects:
|
|
** xref:tinydrive-dotnet.adoc[dot net]
|
|
** xref:tinydrive-java.adoc[java]
|
|
** xref:tinydrive-nodejs.adoc[nodejs]
|
|
** xref:tinydrive-php.adoc[php]
|
|
* Configuration options:
|
|
** xref:tinydrive-setup-options.adoc[Setup]
|
|
** xref:tinydrive-ui-options.adoc[UI]
|
|
** xref:tinydrive-dropbox-and-google-drive.adoc[Integration]
|
|
* Integrations
|
|
** xref:tinydrive-dropbox-integration.adoc[Dropbox]
|
|
** xref:tinydrive-googledrive-integration.adoc[Google Drive]
|
|
|
|
== Need help?
|
|
|
|
We are striving to make {cloudfilemanager} as useful and as simple as possible. For support related issues such as problems with JWT authentication and implementing {cloudfilemanager}, check our xref:support.adoc[help page] or please contact link:{supporturl}[{supportname}].
|