diff --git a/tutorial/php/PhpClient.php b/tutorial/php/PhpClient.php
index dc36f6d..ab38c11 100755
--- a/tutorial/php/PhpClient.php
+++ b/tutorial/php/PhpClient.php
@@ -6,6 +6,7 @@
 require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
 require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
 require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/THttpClient.php';
 require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
 
 /**
@@ -25,7 +26,11 @@
 error_reporting(E_ALL);
 
 try {
-  $socket = new TSocket('localhost', 9090);
+  if (array_search('--http', $argv)) {
+    $socket = new THttpClient('localhost', 8080, '/php/PhpServer.php');
+  } else {
+    $socket = new TSocket('localhost', 9090);
+  }
   $transport = new TBufferedTransport($socket, 1024, 1024);
   $protocol = new TBinaryProtocol($transport);
   $client = new CalculatorClient($protocol);
diff --git a/tutorial/php/PhpServer.php b/tutorial/php/PhpServer.php
new file mode 100755
index 0000000..c0f5e09
--- /dev/null
+++ b/tutorial/php/PhpServer.php
@@ -0,0 +1,114 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This is not a stand-alone server.  It should be run as a normal
+ * php web script (like through Apache's mod_php) or as a cgi script
+ * (like with the included runserver.py).  You can connect to it with
+ * THttpClient in any language that supports it.  The PHP tutorial client
+ * will work if you pass it the argument "--http".
+ */
+
+if (php_sapi_name() == 'cli') {
+  ini_set("display_errors", "stderr");
+}
+
+$GLOBALS['THRIFT_ROOT'] = realpath(dirname(__FILE__).'/../..').'/lib/php/src';
+
+require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TPhpStream.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
+
+/**
+ * Suppress errors in here, which happen because we have not installed into
+ * $GLOBALS['THRIFT_ROOT'].'/packages/tutorial' like we are supposed to!
+ *
+ * Normally we would only have to include Calculator.php which would properly
+ * include the other files from their packages/ folder locations, but we
+ * include everything here due to the bogus path setup.
+ */
+error_reporting(E_NONE);
+$GEN_DIR = realpath(dirname(__FILE__).'/..').'/gen-php';
+require_once $GEN_DIR.'/SharedService.php';
+require_once $GEN_DIR.'/shared_types.php';
+require_once $GEN_DIR.'/Calculator.php';
+require_once $GEN_DIR.'/tutorial_types.php';
+error_reporting(E_ALL);
+
+class CalculatorHandler implements CalculatorIf {
+  protected $log = array();
+
+  public function ping() {
+    error_log("ping()");
+  }
+
+  public function add($num1, $num2) {
+    error_log("add({$num1}, {$num2})");
+    return $num1 + $num2;
+  }
+
+  public function calculate($logid, $w) {
+    error_log("calculate({$logid}, {{$w->op}, {$w->num1}, {$w->num2}})");
+    switch ($w->op) {
+      case tutorial_Operation::ADD:
+        $val = $w->num1 + $w->num2;
+        break;
+      case tutorial_Operation::SUBTRACT:
+        $val = $w->num1 - $w->num2;
+        break;
+      case tutorial_Operation::MULTIPLY:
+        $val = $w->num1 * $w->num2;
+        break;
+      case tutorial_Operation::DIVIDE:
+        if ($w->num2 == 0) {
+          $io = new tutorial_InvalidOperation();
+          $io->what = $w->op;
+          $io->why = "Cannot divide by 0";
+          throw $io;
+        }
+        $val = $w->num1 / $w->num2;
+        break;
+      default:
+        $io = new tutorial_InvalidOperation();
+        $io->what = $w->op;
+        $io->why = "Invalid Operation";
+        throw $io;
+    }
+
+    $log = new SharedStruct();
+    $log->key = $logid;
+    $log->value = (string)$val;
+    $this->log[$logid] = $log;
+
+    return $val;
+  }
+
+  public function getStruct($key) {
+    error_log("getStruct({$key})");
+    // This actually doesn't work because the PHP interpreter is
+    // restarted for every request.
+    //return $this->log[$key];
+    return new SharedStruct(array("key" => $key, "value" => "PHP is stateless!"));
+  }
+
+  public function zip() {
+    error_log("zip()");
+  }
+
+};
+
+header('Content-Type', 'application/x-thrift');
+if (php_sapi_name() == 'cli') {
+  echo "\r\n";
+}
+
+$handler = new CalculatorHandler();
+$processor = new CalculatorProcessor($handler);
+
+$transport = new TBufferedTransport(new TPhpStream(TPhpStream::MODE_R | TPhpStream::MODE_W));
+$protocol = new TBinaryProtocol($transport, true, true);
+
+$transport->open();
+$processor->process($protocol, $protocol);
+$transport->close();
diff --git a/tutorial/php/runserver.py b/tutorial/php/runserver.py
new file mode 100755
index 0000000..d24efd5
--- /dev/null
+++ b/tutorial/php/runserver.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+import os
+import BaseHTTPServer
+import CGIHTTPServer
+
+# chdir(2) into the tutorial directory.
+os.chdir(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
+  cgi_directories  = ['/php']
+
+BaseHTTPServer.HTTPServer(('', 8080), Handler).serve_forever()
