Bunch o' changes..

- Add the ability to return the web page into a variable
	by setting the CURLOPT_RETURNTRANSFER constant to 1.
	- Make everything conform to the naming guidelines.
	- Delete the resource id from the file_id table when a
	resource is closed.
This commit is contained in:
Sterling Hughes 2000-08-20 08:28:00 +00:00
parent 9e6e64955f
commit cd599d17c0
2 changed files with 87 additions and 32 deletions

View file

@ -86,21 +86,23 @@ PHP_FUNCTION(curl_close);
#define CE_BAD_FUNCTION_ARGUMENT 43
#define CE_BAD_CALLING_ORDER 44
#define C_LAST 45
#define CURLOPT_RETURNTRANSFER 500
struct curl_file_id_table {
int id;
int return_transfer;
int output_to_file;
struct curl_file_id_table *next;
};
typedef struct {
int use_file;
int le_curl;
struct curl_file_id_table *output_node, output_start;
struct curl_file_id_table *output_node, *output_previous, output_start;
} php_curl_globals;
#ifdef ZTS
#define CURLG(v) (curl_globals->v)
#define CURLLS_FETCH() php_curl_globals *curl_globals = ts_resource(gd_curl_id)
#define CURLLS_FETCH() php_curl_globals *curl_globals = ts_resource(curl_globals_id)
#else
#define CURLG(v) (curl_globals.v)
#define CURLLS_FETCH()