How to make the gshttp.dll work with lite-c ?

Posted By: Toon

How to make the gshttp.dll work with lite-c ? - 04/02/10 14:32

How can I make the gshttp.dll work with lite-c?

I defined the dllfunction's but it gives an error when I use HTTP_Get. It says 'Can not convert 'ARRAY' to 'FIXED';

Here is my code;

Code:
dllfunction HTTP_Create(); // Create HTTP Client  

dllfunction HTTP_Get(url_str); // HTTP GET the URL in url_str
dllfunction HTTP_Post(url_str,data_str); // HTTP POST the URL in url_str and pass data_str as the post data

dllfunction HTTP_IsWorking(); // Check to see if HTTP_Get() or HTTP_Post() are currently working

dllfunction HTTP_Results(results_str); // Fill results_str with the results from HTTP_Get() or HTTP_Post(). If there was an HTTP error, fills results_str with error number.
dllfunction HTTP_SaveToFile(filename_str); 

dllfunction HTTP_Free(); // Free HTTP Client

var dll_handle;

STRING* ResultString = "#100";

function get_servers()
{
	str_cpy(ResultString,"");
	
	if (HTTP_Create()==0) 
	{ 
		HTTP_Get("http://localhost/index.php");
		
		while(HTTP_IsWorking()==1) 
		{
	   	wait(1);
	  	}
	  	
	  	HTTP_Results(ResultString);
	  	
	  	HTTP_Free();
  	}
}


Posted By: GorNaKosh

Re: How to make the gshttp.dll work with lite-c ? - 04/04/10 06:08

search: http://www.opserver.de/ubb7/ubbthreads.p...1&Main=3793

To all functions you have to pass a var as ID. Look into this thread above...
© 2024 lite-C Forums