|sendgetweb is intended for sending HTTPS and HTTP requests to the site and receiving a response.
Gets the blank page code without a title.
Suitable for parsing sites.
You can send both GET and POST requests
The answer can be received in array char or in string
The function returns the number of bytes received or -1 on error.
If a small char array for receiving is specified, the number of characters equal to the size of the array char -1 will be written. The last element of the array will be written with zero, so you need to allocate an array size at least 1 more than the expected number of received characters.
if (sendgetweb(#C, "My bot", "GET", "https:/"+"/www.google.com", "search?source=hp&q=kibor")>0)
if (sendgetweb(#S, "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)", "GET", "https:/"+"/www.google.com", "search?source=hp&q=kibor")>0)
int k=sendgetweb(#T, "", "GET", "http:/"+"/kibor-bot.com", "");
messagebox (format(k)+" "+T);
The first parameter is a pointer to an array of char or string to which we get the answer
The second is the line of the name of the program that sends the request. You can introduce yourself as an example browser ("Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)") or leave blank.
The third is the type of request. In large letters.
Fourth - A domain with the HTTPS or HTTP protocol.
The fifth is the body of the request.
The Visual Code Editor is Kibor. Creating bots without knowledge of programming.
Learning function for recognizing text.