WP_HTTP_IXR_Client example

$pingback_server_url = discover_pingback_server_uri( $pagelinkedto );

        if ( $pingback_server_url ) {
            if ( function_exists( 'set_time_limit' ) ) {
                set_time_limit( 60 );
            }

            // Now, the RPC call.             $pagelinkedfrom = get_permalink( $post );

            // Using a timeout of 3 seconds should be enough to cover slow servers.             $client          = new WP_HTTP_IXR_Client( $pingback_server_url );
            $client->timeout = 3;
            /** * Filters the user agent sent when pinging-back a URL. * * @since 2.9.0 * * @param string $concat_useragent The user agent concatenated with ' -- WordPress/' * and the WordPress version. * @param string $useragent The useragent. * @param string $pingback_server_url The server URL being linked to. * @param string $pagelinkedto URL of page linked to. * @param string $pagelinkedfrom URL of page linked from. */
Home | Imprint | This part of the site doesn't use cookies.