Return to Snippet

Revision: 71313
at February 18, 2017 05:01 by Uranjitsu


Initial Code
function shareLinksBizFolder($foldername, $och_links)
{
    global $apikey_sharelinks;
    $links = array(
        $och_links
    );

    // POST DATA

    $postdata = array(
        'apikey' => $apikey_sharelinks,
        'folderName' => $foldername,
        'captcha' => '1',
        'c_web' => '1',
        'c_dlc' => '1',
        'c_cnl' => '1',
        'c_ccf' => '1',
        'c_rsdf' => '1',
        'links' => implode("\n", $links)
    );

    // INITIALISE CURL REQUEST

    $ch = curl_init('http://share-links.biz/api/insert');

    // CURL OPTIONS

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);

    // EXECUTE CURL REQUEST

    $result = curl_exec($ch);
    list($share_links) = explode("\n", $result);
    curl_close($ch);
    return $share_links;
}

Initial URL

                                

Initial Description
API function in php for share-links.biz

Initial Title
Share-Links.biz API function

Initial Tags

                                

Initial Language
PHP