Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Me also I’ll be waiting to for the CSV bulk import, please. You can post here the feature?

    Thread Starter elhui2

    (@elhui2)

    Hi.
    This is the good script to get categories:

    <?php
    require_once '../wp-includes/class-IXR.php';
    
    $url='https://domain.com/xmlrpc.php';
    $usr='USER';
    $pas='PASSWORD';
    
    $client = new IXR_Client($url);
    
    $content= 'category';
    
    $params= array(0,$usr,$pas,$content);
    
    if(!$client->query('wp.getTerms',$params)){
        die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
    }
    
    $respuesta=$client->getResponse();
    
    header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
    header('Access-Control-Max-Age: 86400');
    header('Access-Control-Allow-Credentials: true');
    header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
    header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
    header('Cache-Control: no-cache, must-revalidate');
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Content-type: application/json');
    
    echo json_encode($respuesta);
    
    ?>

    ??

    Thread Starter elhui2

    (@elhui2)

    ?? ok sorry for that, my english is very bad! u.u

    ‘nanual’ = tutorial or ‘how to’ … xD

Viewing 3 replies - 1 through 3 (of 3 total)