diff --git a/web/html/rpc.php b/web/html/rpc.php
index 033cba5..d58a487 100644
--- a/web/html/rpc.php
+++ b/web/html/rpc.php
@@ -19,6 +19,7 @@ if ( $_SERVER['REQUEST_METHOD'] == 'GET' ) {
         echo '<ul>';
         echo '<li>search</li>';
         echo '<li>info</li>';
+        echo '<li>all_packages</li>';
         echo '</ul><br />';
         echo 'Each method requires the following HTTP GET syntax:<br />';
         echo '&nbsp;&nbsp; type=<i>methodname</i>&arg=<i>data</i> <br /><br />';
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 81c0831..c30eeef 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -21,7 +21,7 @@ if (!extension_loaded('json'))
  **/
 class AurJSON {
     private $dbh = false;
-    private $exposed_methods = array('search','info');
+    private $exposed_methods = array('search','info','all_packages');
     private $fields = array('ID','Name','Version','CategoryID','Description',
         'URL','URLPath','License','NumVotes','OutOfDate');
 
@@ -147,5 +147,28 @@ class AurJSON {
             return $this->json_error('No result found');
         }
     }
+
+    /**
+     * Returns all packages
+     */
+    private function all_packages() {
+        $query = "SELECT " . implode(',', $this->fields) .
+            " FROM Packages WHERE DummyPkg=0 ";
+
+        $result = db_query($query, $this->dbh);
+
+        if ( $result && (mysql_num_rows($result) > 0) ) {
+            $search_data = array();
+            while ( $row = mysql_fetch_assoc($result) ) {
+                array_push($search_data, $row);
+	    }
+
+            mysql_free_result($result);
+            return $this->json_results('all_packages', $search_data);
+        }
+        else {
+            return $this->json_error('No results found');
+        }
+    }
 }
 
