Verizon Personal Cloud Storage SDK for PHP allows you to develop apps for PHP platform which can access Verizon Personal Cloud Storage user content (subject to the user’s prior approval).
Before you can start coding, you will need to:
Install and configure Personal Cloud Storage SDK for PHP.
NOTE: Minimum software requirements for the SDK:
Configure Your App.
Key, Secret, and Callback URL are established during registration. If you have not yet registered, follow the steps on the Getting Credentials to Use the Personal Cloud Storage APIs page in the API Developer Guide to register.
In order to download Verizon Personal Cloud Storage Android SDK, you must log on to ThingSpace Developer Portal and accept Verizon terms and conditions. If you start downloading the file without logging on, the download will stop and you will be redirected to the log on screen. Download will resume after a successful log on.
Use command line to grant appropriate level of permissions to base folder My Project:
sudo chmod -R 0755 /Library/WebServer/Documents/My Project
Restart the server using the command:
– apachectl restart
You can now access the codebase with the following URL. Note that this is also your local Callback URL:
Starting page Kepler Cloud File Explorer appears. Click Sign In with Verizon Cloud and login with a your mobile number or ThingSpace credentials.
You can now test the features.
sudo apt-get update sudo apt-get install apache2
To install PHP, enter these commands:
udo apt-get install php5 libapache2-mod-php5 php5-mcrypt
Add PHP to the directory index, to serve the relevant PHP index files:
```php sudo nano /etc/apache2/mods-enabled/dir.conf
5. Add **index.php** to the beginning of index files, as follows: **Code Sample** ```php <IfModule mod_dir.c> DirectoryIndex index.php index.html index.cgi index.pl index.php index.xhtml index.htm </IfModule>
Before you can use your app, you must change the settings in the php.ini file to override the existing PHP configuraion.
To link a new php.ini file with your instance of Apache, follow these steps:
/var/www/web1/directory. You can find the php.ini in the following directory: - Debian and Ubuntu -
/etc/php5/apache2/php.ini- Fedora and CentOS -
/var/www/web1/directory. - Debian and Ubuntu -
cp /etc/php5/apache2/php.ini /var/www/web1/- Fedora and CentOS -
cp /etc/php.ini /var/www/web1/
php <VirtualHost 126.96.36.199:80> [...] PHPINIDir /var/www/web1 [...] </VirtualHost> NOTE: PHPINIDir must contain the directory where the php.ini file for the web site is located.
/etc/init.d/apache2 restart- Fedora and CentOS:
NOTE: You can view the htmlpurifier license at https://github.com/ezyang/htmlpurifier/blob/master/LICENSE.
To use htmlpurifier in your app, create an object of
htmlpurifier class using the following code sample:
$purifier = new HTMLPurifier();
You can now use this object to sanitize the user input and output. Use the code sample below:
$purifier→purify($_POST['form input name']);
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.