Test HTTP Requests Tools Blog PHP Quiz API Log In With Github
Test HTTP Requests Tools Blog PHP Quiz API Log In With Github
We have updated the website and our policies to make sure your privacy rights and security are respected.
Click here to learn more about the way our website handles your data.

Remove this message.

Codepunker API Docs

Clone on Github GitHub Build Passed
Getting Started :: Sitemap Generator :: String Converter

End Point

By default all requests should be sent to: https://www.codepunker.com/tools


If you want to access one of the API end points I manage you'll need a valid API key. To generate one, . You'll find your API key in the profile menu after you've authenticated.

Use the CodePunker Api Package

For easy use you can just run composer require codepunker/codepunkerapi Then you can use it as described in the README of the git repo.

Token Generation

If you don't want to use the package, once you've got a valid API key, you have to generate a token which will be used to authenticate you for future requests. Tokens are only valid for 24 hours. To generate the token send a POST request with the parameters below:

    execute [type]: string [value]:authorizeAPI
    key [type]: string [value]:YOUR_API_KEY
    rand [type]: string [value]: a random 32 characters long alphanumeric string1
    {"type":"success", "response":"i_am_a_32_characters_token"} or 
    {"type":"error", "response":"i_am_an_error_message"}
    1 [The random string is required for tasks that use a callback URL]

API End Points:

  • SiteMap Generator

    Description: Crawls your website pages and generates an XML Sitemap containing all your internal links.


        --- STEP 1 ---
            * REQUEST PARAMS: 
                1. "execute" [type]: string [value]:executeSitemapGenerator
                2. "domain" [type]: string [value]: the domain for which you want to generate the sitemap
                3. "freq" [type]:string [value]: valid frequency keywords are: always, 'hourly', 'daily', 'weekly', 'monthly', 'yearly' or 'never'
                4. "token" [type]: string [value]: the token you received as a response after the first request
                5. "callbackuri" [type]: string [value]: a valid url that I should notify that the sitemap is ready for download
                RESPONSE EXAMPLE:
                [example]: {"type":"success", "response":"the current status of your request"} or {"type":"error", "response":"an error message"}
        --- STEP 2 ---
            * Your callback url should be able to receive a request from "codepunker.com" once the site-map generation is done. Codepunker.com will send the following json encoded string through a POST request to http://example.com/yourcallback.php
                1. "data" [type]: string [value]: 
                        {"type": "success", "response": "https://www.codepunker.com/the_url_from_which_you_can_get_your_sitemap"} or
                        {"type":"error", "response":"an error message"}
                2. rand [type]: string [value]: 
                        the random 32 characters alphanumeric string you sent in your first request will be sent back to you to confirm that the request is a valid one.

  • String Converter

    Description: Convert, encode and hash strings to almost anything you can think of.


        Send a POST request with the following parameters:
            1: "string"  [string] (the string you are trying to work with) - required
            2. "method"  [string] ("encode", "decode", "hash1" or "unhash2") - required
            3: "token" [string] (the apiToken you generated at step1)
            4. "execute" [string] (value: executeStringConversion) - required
            1 Full list of hashing algorithms: ["md2", "md4", "md5", - "sha1", "sha256", "sha384", "sha512", - "ripemd128", "ripemd160", "ripemd256", "ripemd320", - "whirlpool", - "tiger128,3", "tiger160,3", "tiger192,3", "tiger128,4", "tiger160,4", "tiger192,4", - "snefru", - "gost", - "adler32", - "crc32", "crc32b", - "haval128,3", "haval160,3", "haval192,3", "haval224,3", "haval256,3", "haval128,4", "haval160,4", "haval192,4", "haval224,4", "haval256,4", "haval128,5", "haval160,5", "haval192,5", "haval224,5", "haval256,5"]
            2 Supported hashing algorithms: ["md5", "sha256"]