Kibor Bot Autoclicker » Kibor - Integrated development environment for bots » About Kibor » Version 3.11 Sending HTML requests. Work on the Internet.

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

1. Kibor - 24 Июля, 2018 - 04:58:52 - перейти к сообщению
Implemented functions that allow you to work with the Internet.
With their help you can download files, connect to different services (for example, guessing captcha), etc.

opensocket - opens socket
opensocket ("kibor-bot.com", 80); // To the address
opensocket ("176.9.203.18", 80); // by ip
The first parameter is the address or ip.
Returns 1 if successful.

sendhtml - sends bytes to the server
sendhtml (#s [0], 52);
The first parameter is a pointer to the array of char to be sent.
The second is the number of bytes sent
Returns the number of bytes sent.

recvhtml - receives a response from the server
recvhtml (#p [0], 500);
The first parameter is a pointer to the array char in which the entry will be
The second is the number of bytes received
Returns the number of bytes received.

closesocket - close the socket
closesocket ();
Returns 1 for success.

For detailed information on the formation of the GET and POST headings, search the Internet.

Example of setting up the connection and downloading the page(для просмотра ссылки Вам необходимо авторизоваться)
CODE:
char s [100];
char p [9999];
// if (opensocket ("176.9.203.18", 80) == 1) // It is possible on ip
if (opensocket ("kibor-bot.com", 80) == 1) // If you opened the socket
{
strcpy (#s [0], "GET http:/" + "/ kibor-bot.com/stat/programmed-autoclicker.php HTTP / 1.0"); // Form the GET request
int sizf=size (#s [0]); // Find the number in the end-of-line array with the GET request
// Write \ r \ n \ r \ n - the end of the header
s [sizf]=formatic (13); s [sizf + 1]=formatic (10); s [sizf + 2]=formatic (13); s [sizf + 3]=formatic (10);

if (sendhtml (#s [0], sizf + 4)> 0) // If you sent a request
{
recvhtml (#p [0], 9999); // read the answer
messagebox (format (#p [0])); // Reproduce
}
closesocket (); // Close
}

Powered by ExBB FM 1.0 Final