This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| #include <sstream> | |
| #include <string> | |
| #include <vector> | |
| #include <curl/curl.h> | |
| const char* api_url = "https://api.pdfcrowd.com/convert/latest/"; | |
| const char* username = "demo"; | |
| const char* api_key = "ce544b6ea52a5621fb9d55f8b542d14d"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::fs::File; | |
| use std::error::Error; | |
| use reqwest::blocking::Client; | |
| use reqwest::blocking::multipart::{Form, Part}; | |
| // API endpoint and Pdfcrowd credentials | |
| static API_ENDPOINT: &'static str = "https://api.pdfcrowd.com/convert/latest/"; | |
| static USERNAME: &'static str = "demo"; | |
| static API_KEY: &'static str = "ce544b6ea52a5621fb9d55f8b542d14d"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <curl/curl.h> | |
| #define API_ENDPOINT "https://api.pdfcrowd.com/convert/latest/" | |
| #define USERNAME "demo" | |
| #define API_KEY "ce544b6ea52a5621fb9d55f8b542d14d" | |
| /* structure for conversion options */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| whois -h whois.radb.net -- '-i origin AS15169' | grep -Eo "([0-9.]+){4}/[0-9]+" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require 'pdfcrowd.php'; | |
| try | |
| { | |
| // generate a PDF file | |
| $client = new \Pdfcrowd\HtmlToPdfClient($username, $apikey); | |
| $pdf = $client->convertString('Hello World'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // uses the PHP PEAR modules for sending MIME email | |
| // http://pear.php.net/package/Mail | |
| // http://pear.php.net/package/Mail_Mime | |
| <?php | |
| require 'pdfcrowd.php'; | |
| require_once('Mail.php'); | |
| require_once('Mail/mime.php'); | |
| $client = new \Pdfcrowd\HtmlToPdfClient($username, $apikey); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* compile with: $ gcc pdfcrowd.c -lcurl -o pdfcrowd */ | |
| #include <curl/curl.h> | |
| /* | |
| * return values: | |
| * 0 success | |
| * 1 curl fatal error | |
| * 2 curl error | |
| * >399 API error (HTTP status code) | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require 'pdfcrowd.php'; | |
| try | |
| { | |
| // generate a PDF file | |
| $client = new Pdfcrowd($username, $apikey); | |
| $pdf = $client->convertHtml("Hello World"); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // uses the PHP PEAR modules for sending MIME email | |
| // http://pear.php.net/package/Mail | |
| // http://pear.php.net/package/Mail_Mime | |
| <?php | |
| require 'pdfcrowd.php'; | |
| require_once('Mail.php'); | |
| require_once('Mail/mime.php'); |
NewerOlder