Index: trunk/ippTools/src/pstamptool.c
===================================================================
--- trunk/ippTools/src/pstamptool.c	(revision 27969)
+++ trunk/ippTools/src/pstamptool.c	(revision 28106)
@@ -53,4 +53,5 @@
 static bool updatedependentMode(pxConfig *config);
 static bool revertdependentMode(pxConfig *config);
+static bool getwebrequestnumMode(pxConfig *config);
 
 # define MODECASE(caseName, func) \
@@ -95,4 +96,5 @@
         MODECASE(PSTAMPTOOL_MODE_UPDATEDEPENDENT, updatedependentMode);
         MODECASE(PSTAMPTOOL_MODE_REVERTDEPENDENT, revertdependentMode);
+        MODECASE(PSTAMPTOOL_MODE_GETWEBREQUESTNUM, getwebrequestnumMode);
         default:
             psAbort("invalid option (this should not happen)");
@@ -1334,2 +1336,18 @@
     return true;
 }
+
+static bool getwebrequestnumMode(pxConfig *config)
+{
+    PS_ASSERT_PTR_NON_NULL(config, false);
+
+    if (!pstampWebRequestInsert(config->dbh, 0 )) {
+        psError(PS_ERR_UNKNOWN, false, "failed to insert pstampWebRequest");
+        return false;
+    }
+
+    psS64 req_id = psDBLastInsertID(config->dbh);
+
+    printf("%" PRId64 "\n", req_id);
+
+    return true;
+}
