Added socket stream and socket into SilcClientConnection context.
[silc.git] / lib / silchttp / silchttpphp.h
1 /*
2
3   silchttpphp.h
4
5   Author: Pekka Riikonen <priikone@silcnet.org>
6
7   Copyright (C) 2006 - 2007 Pekka Riikonen
8
9   This program is free software; you can redistribute it and/or modify
10   it under the terms of the GNU General Public License as published by
11   the Free Software Foundation; version 2 of the License.
12
13   This program is distributed in the hope that it will be useful,
14   but WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16   GNU General Public License for more details.
17
18 */
19
20 /****h* silchttp/SILC HTTP PHP Translator
21  *
22  * DESCRIPTION
23  *
24  * PHP translator for SILC HTTP Server, enabling PHP support for the pages
25  * served through the SILC HTTP Server interface (silchttpserver.h).
26  * The PHP must be installed in the system and must be in the execution
27  * path for the interface to work.
28  *
29  ***/
30
31 #ifndef SILCHTTPPHP_H
32 #define SILCHTTPPHP_H
33
34 /****f* silchttp/SilcHTTPServer/silc_http_php
35  *
36  * SYNOPSIS
37  *
38  *    SilcBuffer silc_http_php(char *php_data);
39  *
40  * DESCRIPTION
41  *
42  *    Executes the PHP code contained in the buffer `php_data' and returns
43  *    the result in the allocated SilcBuffer or NULL on error.  The caller
44  *    must free the returned buffer.
45  *
46  ***/
47 SilcBuffer silc_http_php(char *php_data);
48
49 /****f* silchttp/SilcHTTPServer/silc_http_php_file
50  *
51  * SYNOPSIS
52  *
53  *    SilcBuffer silc_http_php_file(const char *filepath);
54  *
55  * DESCRIPTION
56  *
57  *    Reads the PHP contents from the file indicated by the `filepath' and
58  *    executes the PHP code and returns the result in the allocated
59  *    SilcBuffer or NULL on error.  The caller must free the returned buffer.
60  *
61  ***/
62 SilcBuffer silc_http_php_file(const char *filename);
63
64 #endif /* SILCHTTPPHP_H */