All AbelCam functionality has been terminated October 8th 2019
 
 
 
Navigation

Edit detail for How to use PHP revision 2 of 20

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Editor: sse
Time: 2010/02/20 20:06:03 GMT+1
Note:

changed:
-
AbelCam supports the use of PHP.<p>

To use PHP within AbelCam, install the PHP 5.2.9 zip package 

from <a href="http://www.php.net/" target="_blank">www.php.net</a> download <a href="http://www.php.net/get/php-5.2.9-1-Win32.zip/from/a/mirror" target="_blank">php-5.2.9-Win32.zip</a><br>
<small>5.2.9 is the current release - later versions are expected to work as well.</small></p><p>

<small>Copy all files in the zip to c:\php\</small></p><p>
</p><p>
<small>Use wwwroot\php\c-php-php.ini as template for c:\php\php.ini
</small></p><p><small><img src="/img/php.gif" alt="PHP Logo" align="right">
Start AbelCam, the PHP Logo will be shown on the <a href="web.html" target="popup" onclick="PopWin('web.html','devices', 50, 50, 800, 800); return false;">Web</a> page</small></p>

<small>&nbsp;
</small><p>

<small>Once PHP is enabled, you can have a look at the PHP examples in wwwroot\php: <a href="http://localhost:8080/php">http://localhost:8080/php</a><br>
A small page counter example is included.
</small></p><p><small>&nbsp;</small></p>
<small>The following environment variables are set for PHP files<br>&nbsp;

</small><table width="600" border="0" cellpadding="3">
<tbody><tr><td><b>Variable</b></td><td><b>Meaning,Value</b></td></tr>
<tr><td>ABELDATA</td><td>%ALLUSERSPROFILE%\Seiz System Engineering\AbelCam<br>Location of configuration files</td></tr> 
<tr><td>ACTIVECAMS </td><td>active camera numbers, separated by commas </td></tr>

<tr><td>CAMFPS </td><td>frame rate of the current camera </td></tr>
<tr><td>CAMNAME </td><td>name of the current camera</td></tr>
<tr><td>CAMNAMES </td><td>names of active cameras, separated by commas </td></tr>
<tr><td>CAMNR </td><td>active cam number </td></tr>
<tr><td>CAMRESOLUTION </td><td>active cam resolution, eg. 320x240 </td></tr>
<tr><td>COOKIES </td><td>cookies set for AbelCam, eg. cam="0" </td></tr>

<tr><td>DOC_ROOT </td><td>AbelCam document root</td></tr>
<tr><td>HTTP_REFERER </td><td>refering page, eg. http://localhost:8080/php/index.php </td></tr>
<tr><td>OUTPUTHEIGHT </td><td>output height of current camera, eg. 240 </td></tr>
<tr><td>OUTPUTWIDTH </td><td>output width of current camera, eg. 320 </td></tr>
<tr><td>REDIRECT_STATUS </td><td>always set to 200</td></tr>
<tr><td>REMOTE_ADDR </td><td>ip address of requestor, eg. 127.0.0.1 </td></tr>

<tr><td>REQUEST_METHOD </td><td>GET </td></tr>
<tr><td>SCRIPT_FILENAME </td><td>script file name, eg. index.php </td></tr>
<tr><td>SCRIPT_NAME </td><td>same as above</td></tr>
<tr><td>SERVER_CONFDIR </td><td>installation folder, eg. C:\ProgramData\Seiz System Engineering\AbelCam </td></tr>
<tr><td>SERVER_NAME </td><td>AbelCam server name, eg. localhost </td></tr>
<tr><td>SERVER_PORT </td><td>AbelCam server port, eg. 8080 </td></tr>

<tr><td>SERVER_PROTOCOLL </td><td>always HTTP/1.1 </td></tr>
<tr><td>SERVER_SOFTWARE </td><td>AbelCam version, eg. AbelCam  2.1.1 Pro </td></tr>
<tr><td>ORIG_PATH_INFO </td><td>script relative to document root, eg. /php/index.php </td></tr>
</tbody></table>
<small><br>
other environment variables set by the operating system are available as well.</small>

AbelCam supports the use of PHP.

To use PHP within AbelCam, install the PHP 5.2.9 zip package from www.php.net download php-5.2.9-Win32.zip
5.2.9 is the current release - later versions are expected to work as well.

Copy all files in the zip to c:\php\

Use wwwroot\php\c-php-php.ini as template for c:\php\php.ini

PHP Logo Start AbelCam, the PHP Logo will be shown on the Web page

 

Once PHP is enabled, you can have a look at the PHP examples in wwwroot\php: http://localhost:8080/php
A small page counter example is included.

 

The following environment variables are set for PHP files
 
VariableMeaning,Value
ABELDATA%ALLUSERSPROFILE%\Seiz System Engineering\AbelCam
Location of configuration files
ACTIVECAMS active camera numbers, separated by commas
CAMFPS frame rate of the current camera
CAMNAME name of the current camera
CAMNAMES names of active cameras, separated by commas
CAMNR active cam number
CAMRESOLUTION active cam resolution, eg. 320x240
COOKIES cookies set for AbelCam, eg. cam="0"
DOC_ROOT AbelCam document root
HTTP_REFERER refering page, eg. http://localhost:8080/php/index.php
OUTPUTHEIGHT output height of current camera, eg. 240
OUTPUTWIDTH output width of current camera, eg. 320
REDIRECT_STATUS always set to 200
REMOTE_ADDR ip address of requestor, eg. 127.0.0.1
REQUEST_METHOD GET
SCRIPT_FILENAME script file name, eg. index.php
SCRIPT_NAME same as above
SERVER_CONFDIR installation folder, eg. C:\ProgramData?\Seiz System Engineering\AbelCam
SERVER_NAME AbelCam server name, eg. localhost
SERVER_PORT AbelCam server port, eg. 8080
SERVER_PROTOCOLL always HTTP/1.1
SERVER_SOFTWARE AbelCam version, eg. AbelCam 2.1.1 Pro
ORIG_PATH_INFO script relative to document root, eg. /php/index.php

other environment variables set by the operating system are available as well.