SlideShare a Scribd company logo
1 of 28
PHP Web Apps on Google Cloud
Bhavik Shah
Software Architect. Technologist. Evangelist.
Introduction
PaaS Clouds with PHP!
Google App Engine
Scalable, Reliable & Fast PaaS
* Experimental
PHP Support.
Why PHP?
Built for Web
Easy to Learn
Most Requested
<?php
echo "Hello World!";
?>
PHP
Frameworks
Rapid
Most popular
75% of Web is served by PHP
(as per Google)
Symbiotic relation
Google provides a great platform for PHP
PHP brings a popular language to Google.
PHP on App Engine
Image Courtesy: Google IO 2013
How to PHP?
Installation
Python 2.7
Google App Engine SDK 1.8.4
PHP (Thread Safe) 5.4
Remember:
Add each of it to your OS’s PATH variable.
URLs
http://www.python.org
https://developers.google.com/appengine/
http://php.net/downloads.php
Example installers (for Windows):
GoogleAppEngine-1.8.3.msi and php-5.4.17-Win32-VC9-x86.zip
Sign up
Google provides a great platform for PHP
PHP provides a language to Google.
Create application
Google provides a great platform for PHP
PHP provides a language to Google.
Creating application locally - 1
app.yaml
application: <your-app-id>
version: 1
runtime: php
api_version: 1
threadsafe: true
handlers:
- url: /assets
  script: assets
- url: /.*
  script: index.php
YAML
Creating application locally - 2
index.php
<?php
echo "Hello World!";
?>
PHP
Creating application locally - 3
php.ini
; php.ini
google_app_engine.enable_functions = "php_sapi_name,
php_uname, phpinfo"
INI
Creating application locally - 4
phpinfo.php
<?php
echo phpinfo();
?>
PHP
Deploying
Executing Application (Runs Locally)
dev_appserver.py --php_executable_path=
C:phpphp-cgi.exe <application id>
Update source to Google App Engine
appcfg.py update php-4-gae
Access on Google App Engine
http://<application id>.appspot.com/
Features
Cloud SQL
MySQL 5.5 in Cloud
Automatic Backups
Automatic replication
Geo-Located with App
Resource Limit
Maximum Request Size 16 MB
Maximum Response Size 16 MB
//PDO
$db = new PDO('mysql:unix_socket=/cloudsql/hello-php:my-cloudsql-instance;charset=utf8',
'<username>',
'<password>'
);
//mysql_connect
$conn = mysql_connect(":/cloudsql/hello-php:my-cloudsql-instance", "<username>",
"<password>");
//mysqli
$sql = new mysqli(null, "<username>", "<password>", null, null, "/cloudsql/hello-php:my-
cloudsql-instance");
PHP
Cloud Storage
Built in Stream Wrappers allowing use of
file api’s like file_get_contents();
$fp = fopen("gs://my_bucket/some_file.txt", "w");
fwrite($fp, "Hello");
fclose($fp);
$options = [ "gs" => [ "Content-Type" => "text/plain" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx);
PHP
Functions disabled by default
Manual enabling possible via php.ini
gc_collect_cycles(), gc_enable() and gc_disable()
getmypid()
getmyuid()
getrusage()
getmyinode()
getmygid()
get_current_user()
libxml_disable_entity_loader()*
parse_str()
phpinfo()
phpversion()
PHP
Disabled Functions
Permanently disabled
disk_free_space()
diskfreespace()
escapeshellarg() and escapeshellcmd()
exec()
fsockopen()
link()
passthru()
popen(), proc_close(), prog_get_status(), proc_nice(), proc_open() and proc_terminate()
set_time_limit()
shell_exec()
show_source()
symlink()
system()
tmpfile()
tempnam()
PHP
Limits on PHP
Limit Amount
request size 32 megabytes
response size 32 megabytes
request duration 60 seconds
maximum total number of files (app files and static files) 10,000 total
1,000 per directory
maximum size of an application file 32 megabytes
maximum size of a static file 32 megabytes
maximum total size of all application and static files first 1 gigabyte is free
$0.13 per gigabyte per month after first 1 gigabyte
All database requests must finish within the HTTP request timer, around 60
seconds.
Offline requests like cron tasks have a time limit of 10 minutes.
Backend requests to Google Cloud SQL have a time limit of 10 minutes.
Other Services
Application Identity
Logs
Mail
MemCache
URL Fetch
User Authentication
Task Queues
Web App : URL Shortener
Use Bootstrap with PHP
Recommended: CodeIgnitor or Yii
Source Code available at https://github.com/bhavik1st/php-
4-gae
Web App on Google App Engine
http://php-4-gae.appspot.com/
$client = new Google_Client();
$service = new Google_UrlshortenerService($client); $taskDone = false;
if (isset($_GET['url']))
{
// Start to make API requests.
$url = new Google_Url(); $url->longUrl = $_GET['url'];
//Shorten URL
$shortUrl = $service->url->insert($url);
$taskDone = true;
}
PHP
Demo
References & Other details
developer.google.com
venturebeat.com
udemy.org
Disclaimer: All images & logos used in
the presentation are various trademarks
of respective organizations.
Other details
Code : https://github.com/bhavik1st/php-4-gae
Article: http://goo.gl/X7hbBI
Questions?
Thank you for your attention
Bhavik Shah
Twitter: bhavik1st
Email: bhavik1st@gmail.com
www.linkedin.com/in/bhavik1st

More Related Content

What's hot

GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
Nat Weerawan
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
ronnywang_tw
 
Simple php backdoor_by_dk
Simple php backdoor_by_dkSimple php backdoor_by_dk
Simple php backdoor_by_dk
Stan Adrian
 

What's hot (19)

GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
 
Drupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case StudyDrupal Performance - SerBenfiquista.com Case Study
Drupal Performance - SerBenfiquista.com Case Study
 
WP migrations
WP migrationsWP migrations
WP migrations
 
Challenges of container configuration
Challenges of container configurationChallenges of container configuration
Challenges of container configuration
 
autopkgtest lightning talk
autopkgtest lightning talkautopkgtest lightning talk
autopkgtest lightning talk
 
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
 
Scaling up development of a modular code base
Scaling up development of a modular code baseScaling up development of a modular code base
Scaling up development of a modular code base
 
Heavy Web Optimization: Backend
Heavy Web Optimization: BackendHeavy Web Optimization: Backend
Heavy Web Optimization: Backend
 
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++SECCOM 2017 - Conan.io o gerente de pacote para C e C++
SECCOM 2017 - Conan.io o gerente de pacote para C e C++
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
Asynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time MessagingAsynchronous PHP and Real-time Messaging
Asynchronous PHP and Real-time Messaging
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
 
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
 
Simple php backdoor_by_dk
Simple php backdoor_by_dkSimple php backdoor_by_dk
Simple php backdoor_by_dk
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
livedoor blogのsorryサーバの話 #study2study
livedoor blogのsorryサーバの話 #study2studylivedoor blogのsorryサーバの話 #study2study
livedoor blogのsorryサーバの話 #study2study
 
Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境Mac OS X Lion で作る WordPress local 環境
Mac OS X Lion で作る WordPress local 環境
 
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswiftmacOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
macOS アプリで Swift Package Manager を使ってみる #love_swift #hakataswift
 

Similar to GDG DevFest 2013 - PHP Web Apps on Google Cloud

3. build your own php extension ai ti aptech
3. build your own php extension   ai ti aptech3. build your own php extension   ai ti aptech
3. build your own php extension ai ti aptech
Quang Anh Le
 
07 build your-own_php_extension
07 build your-own_php_extension07 build your-own_php_extension
07 build your-own_php_extension
Nguyen Duc Phu
 
Build your own PHP extension
Build your own PHP extensionBuild your own PHP extension
Build your own PHP extension
Võ Duy Tuấn
 
build your own php extension
build your own php extensionbuild your own php extension
build your own php extension
hazzaz
 

Similar to GDG DevFest 2013 - PHP Web Apps on Google Cloud (20)

3. build your own php extension ai ti aptech
3. build your own php extension   ai ti aptech3. build your own php extension   ai ti aptech
3. build your own php extension ai ti aptech
 
07 build your-own_php_extension
07 build your-own_php_extension07 build your-own_php_extension
07 build your-own_php_extension
 
Build your own PHP extension
Build your own PHP extensionBuild your own PHP extension
Build your own PHP extension
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
PHP Hypertext Preprocessor
PHP Hypertext PreprocessorPHP Hypertext Preprocessor
PHP Hypertext Preprocessor
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Deploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineDeploy a PHP App on Google App Engine
Deploy a PHP App on Google App Engine
 
PHP Backdoor: The rise of the vuln
PHP Backdoor: The rise of the vulnPHP Backdoor: The rise of the vuln
PHP Backdoor: The rise of the vuln
 
PSR-7 and PSR-15, why can't you ignore them
PSR-7 and PSR-15, why can't you ignore themPSR-7 and PSR-15, why can't you ignore them
PSR-7 and PSR-15, why can't you ignore them
 
Php
PhpPhp
Php
 
Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)
 
How PHP works
How PHP works How PHP works
How PHP works
 
Hacking with hhvm
Hacking with hhvmHacking with hhvm
Hacking with hhvm
 
PHP: The easiest language to learn.
PHP: The easiest language to learn.PHP: The easiest language to learn.
PHP: The easiest language to learn.
 
Day1
Day1Day1
Day1
 
Diving into HHVM Extensions (Brno PHP Conference 2015)
Diving into HHVM Extensions (Brno PHP Conference 2015)Diving into HHVM Extensions (Brno PHP Conference 2015)
Diving into HHVM Extensions (Brno PHP Conference 2015)
 
build your own php extension
build your own php extensionbuild your own php extension
build your own php extension
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

GDG DevFest 2013 - PHP Web Apps on Google Cloud

  • 1. PHP Web Apps on Google Cloud Bhavik Shah Software Architect. Technologist. Evangelist.
  • 4. Google App Engine Scalable, Reliable & Fast PaaS * Experimental PHP Support.
  • 5. Why PHP? Built for Web Easy to Learn Most Requested <?php echo "Hello World!"; ?> PHP Frameworks Rapid Most popular 75% of Web is served by PHP (as per Google)
  • 6. Symbiotic relation Google provides a great platform for PHP PHP brings a popular language to Google.
  • 7. PHP on App Engine Image Courtesy: Google IO 2013
  • 9. Installation Python 2.7 Google App Engine SDK 1.8.4 PHP (Thread Safe) 5.4 Remember: Add each of it to your OS’s PATH variable. URLs http://www.python.org https://developers.google.com/appengine/ http://php.net/downloads.php Example installers (for Windows): GoogleAppEngine-1.8.3.msi and php-5.4.17-Win32-VC9-x86.zip
  • 10. Sign up Google provides a great platform for PHP PHP provides a language to Google.
  • 11. Create application Google provides a great platform for PHP PHP provides a language to Google.
  • 12. Creating application locally - 1 app.yaml application: <your-app-id> version: 1 runtime: php api_version: 1 threadsafe: true handlers: - url: /assets   script: assets - url: /.*   script: index.php YAML
  • 13. Creating application locally - 2 index.php <?php echo "Hello World!"; ?> PHP
  • 14. Creating application locally - 3 php.ini ; php.ini google_app_engine.enable_functions = "php_sapi_name, php_uname, phpinfo" INI
  • 15. Creating application locally - 4 phpinfo.php <?php echo phpinfo(); ?> PHP
  • 16. Deploying Executing Application (Runs Locally) dev_appserver.py --php_executable_path= C:phpphp-cgi.exe <application id> Update source to Google App Engine appcfg.py update php-4-gae Access on Google App Engine http://<application id>.appspot.com/
  • 18. Cloud SQL MySQL 5.5 in Cloud Automatic Backups Automatic replication Geo-Located with App Resource Limit Maximum Request Size 16 MB Maximum Response Size 16 MB //PDO $db = new PDO('mysql:unix_socket=/cloudsql/hello-php:my-cloudsql-instance;charset=utf8', '<username>', '<password>' ); //mysql_connect $conn = mysql_connect(":/cloudsql/hello-php:my-cloudsql-instance", "<username>", "<password>"); //mysqli $sql = new mysqli(null, "<username>", "<password>", null, null, "/cloudsql/hello-php:my- cloudsql-instance"); PHP
  • 19. Cloud Storage Built in Stream Wrappers allowing use of file api’s like file_get_contents(); $fp = fopen("gs://my_bucket/some_file.txt", "w"); fwrite($fp, "Hello"); fclose($fp); $options = [ "gs" => [ "Content-Type" => "text/plain" ]]; $ctx = stream_context_create($options); file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx); PHP
  • 20. Functions disabled by default Manual enabling possible via php.ini gc_collect_cycles(), gc_enable() and gc_disable() getmypid() getmyuid() getrusage() getmyinode() getmygid() get_current_user() libxml_disable_entity_loader()* parse_str() phpinfo() phpversion() PHP
  • 21. Disabled Functions Permanently disabled disk_free_space() diskfreespace() escapeshellarg() and escapeshellcmd() exec() fsockopen() link() passthru() popen(), proc_close(), prog_get_status(), proc_nice(), proc_open() and proc_terminate() set_time_limit() shell_exec() show_source() symlink() system() tmpfile() tempnam() PHP
  • 22. Limits on PHP Limit Amount request size 32 megabytes response size 32 megabytes request duration 60 seconds maximum total number of files (app files and static files) 10,000 total 1,000 per directory maximum size of an application file 32 megabytes maximum size of a static file 32 megabytes maximum total size of all application and static files first 1 gigabyte is free $0.13 per gigabyte per month after first 1 gigabyte All database requests must finish within the HTTP request timer, around 60 seconds. Offline requests like cron tasks have a time limit of 10 minutes. Backend requests to Google Cloud SQL have a time limit of 10 minutes.
  • 23. Other Services Application Identity Logs Mail MemCache URL Fetch User Authentication Task Queues
  • 24. Web App : URL Shortener Use Bootstrap with PHP Recommended: CodeIgnitor or Yii Source Code available at https://github.com/bhavik1st/php- 4-gae Web App on Google App Engine http://php-4-gae.appspot.com/ $client = new Google_Client(); $service = new Google_UrlshortenerService($client); $taskDone = false; if (isset($_GET['url'])) { // Start to make API requests. $url = new Google_Url(); $url->longUrl = $_GET['url']; //Shorten URL $shortUrl = $service->url->insert($url); $taskDone = true; } PHP
  • 25. Demo
  • 26. References & Other details developer.google.com venturebeat.com udemy.org Disclaimer: All images & logos used in the presentation are various trademarks of respective organizations. Other details Code : https://github.com/bhavik1st/php-4-gae Article: http://goo.gl/X7hbBI
  • 28. Thank you for your attention Bhavik Shah Twitter: bhavik1st Email: bhavik1st@gmail.com www.linkedin.com/in/bhavik1st

Editor's Notes

  1. Image Courtesy: Wikimedia, http://gdg-generator.appspot.com/, GDG
  2. PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
  3. Despite node and Ruby http://en.wikipedia.org/wiki/PHP#cite_note-W3Techs_usage_statistics-79 http://w3techs.com/technologies/overview/programming_language/all stood for  Personal Home Page , [4]  it now stands for  PHP: Hypertext Preprocessor , 
  4. Despite critic of PHP about language inconsistency, scalability, performance.
  5. Multiple data centers Memcache optimizes Mysql library ..
  6. PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
  7. PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
  8. PDO $db = new PDO(&apos;mysql:unix_socket=/cloudsql/hello-php:my-cloudsql-instance;charset=utf8&apos;,   &apos;&lt;username&gt;&apos;,   &apos;&lt;password&gt;&apos; ); mysql_connect $conn = mysql_connect(&quot;:/cloudsql/hello-php:my-cloudsql-instance&quot;, &quot;&lt;username&gt;&quot;, &quot;&lt;password&gt;&quot;); mysqli $sql = new mysqli(null, &quot;&lt;username&gt;&quot;, &quot;&lt;password&gt;&quot;, null, null, &quot;/cloudsql/hello-php:my-cloudsql-instance&quot;);
  9. PaaS - Platform as a Service, Web Hosting Scalable - Storages, Databases and Services Reliable - Distributed, Redundancy Languages - Python, Java, Go and PHP * PaaS uses same infrastructure that Google Applications Use. Reliability zero downtime Google IO 2013 May 14 2013 San Fransisco.
  10. $client = new Google_Client();$service = new Google_UrlshortenerService($client);$taskDone = false; if (isset($_GET[&apos;url&apos;])) { // Start to make API requests. $url = new Google_Url(); $url-&gt;longUrl = $_GET[&apos;url&apos;]; //Shorten URL $shortUrl = $service-&gt;url-&gt;insert($url); $taskDone = true; }