IXR_Server::output() WordPress Method

The IXR_Server::output() method is used to send an XML-RPC response back to the client. This method takes a single parameter, which is the XML-RPC response string.

IXR_Server::output( $xml ) #


Source

File: wp-includes/IXR/class-IXR-server.php

    function output($xml)
    {
        $charset = function_exists('get_option') ? get_option('blog_charset') : '';
        if ($charset)
            $xml = '<?xml version="1.0" encoding="'.$charset.'"?>'."\n".$xml;
        else
            $xml = '<?xml version="1.0"?>'."\n".$xml;
        $length = strlen($xml);
        header('Connection: close');
        if ($charset)
            header('Content-Type: text/xml; charset='.$charset);
        else
            header('Content-Type: text/xml');
        header('Date: '.gmdate('r'));
        echo $xml;
        exit;
    }

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.