Tagalog Reader Home Tagalog Reader
Add Reader Entry Tagalog Reader Menu

TDC Reader Integration

Plain Text Content Link

Send plain text content to the Reader. This should not include HTML, only plain text.

Link to:
https://www.tagalog.com/reader/index.php?import_content_url=https%3A%2F%2Fwww.mywebsite.com%2Fmycontent.txt

* Note: the content url must be url encoded in the link to work. URLs are limited to 1024 characters in length.

Obfuscated Content Link

Sometimes you may wish to obscure the link to your content from the user (in case your content is private and you don't want to provide direct access to the content to the user).

To send an obfuscated link with your content, first register an API key (free, no registration required). Then link to the Tagalog Reader in the following format:
Replace the public_key value with your own public key.

To create the "import_obfuscated_content_url" value, use the following steps:
Sample PHP Code:

$method = 'aes-256-cbc';
$content_url = 'https://www.yourcontenturlhere/';
$iv = substr(hash('sha256', $key), 0, 16);
$encrypted = openssl_encrypt($content_url, $method, $secret_key, 0, $iv);
$import_obfuscated_content_url = base64_encode($encrypted);
    
Sample Javsacript Code:

const crypto = require('crypto');

const method = 'aes-256-cbc';
const key = crypto.createHash('sha256').update(String(secret_key)).digest('base64').substr(0, 32);
const iv = crypto.createHash('sha256').update(String(secret_key)).digest().substr(0, 16);

const encrypt = (data) => {
    let cipher = crypto.createCipheriv(method, key, iv);
    let encrypted = cipher.update(data, 'utf8', 'base64');
    encrypted += cipher.final('base64');
    return encrypted;
}

const data = "https://www.yourcontenturlhere/";
const encrypted = encrypt(data);
const import_obfuscated_content_url = Buffer.from(encrypted).toString('base64');
        

Sample Python Code:

from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
import base64
import hashlib

method = 'aes-256-cbc'
content_url = 'https://www.yourcontenturlhere/'
secret_key = 'your_secret_key'

iv = hashlib.sha256(secret_key.encode()).digest()[:16]

cipher = AES.new(secret_key.encode(), AES.MODE_CBC, iv)

encrypted = cipher.encrypt(pad(content_url.encode(), AES.block_size))
import_obfuscated_content_url = base64.b64encode(encrypted).decode()
        

HTML Content Link

Coming Soon! Pass a URL to an HTML page to import the content within that page, removing all HTML tags and formatting.