1#include <curl/curl.h>
2#include <stdio.h>
3
4int main() {
5 CURL *curl = curl_easy_init();
6 if(curl) {
7 curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/security?apiKey=API_KEY&ip=8.8.8.8");
8 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
9 curl_easy_perform(curl);
10 curl_easy_cleanup(curl);
11 }
12 return 0;
13}1#include <curl/curl.h>
2#include <stdio.h>
3
4int main() {
5 CURL *curl = curl_easy_init();
6 if(curl) {
7 curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/security?apiKey=API_KEY");
8 curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
9 struct curl_slist *headers = NULL;
10 headers = curl_slist_append(headers, "Content-Type: application/json");
11 curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
12 curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{"ips":["1.1.1.1","2.2.2.2","8.8.8.8"]}");
13 curl_easy_perform(curl);
14 curl_easy_cleanup(curl);
15 }
16 return 0;
17}