Kibor Bot Autoclicker » Kibor - Integrated development environment for bots » About Kibor » Version 5.43 Working with the HTTPS protocol

Страниц (1): [1]

1. Kibor - 23 Сентября, 2018 - 16:23:25 - перейти к сообщению
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.

char C[100000];
if (sendgetweb(#C[0], "My bot", "GET", "https:/"+"/", "search?source=hp&q=kibor")>0)
messagebox (format(#C[0]));

string S;
if (sendgetweb(#S, "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)", "GET", "https:/"+"/", "search?source=hp&q=kibor")>0)
messagebox (S);

string T[5];
int k=sendgetweb(#T[2], "", "GET", "http:/"+"/", "");
if (k>0)
messagebox (format(k)+" "+T[2]);

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.

Powered by ExBB FM 1.0 Final