xmlrpc_encode_request

(PHP 4 >= 4.1.0, PHP 5, PHP 7)

xmlrpc_encode_requestGenerates XML for a method request

Beschreibung

xmlrpc_encode_request(string $method, mixed $params, array $output_options = ?): string
Warnung

Diese Funktion ist EXPERIMENTELL. Das Verhalten, der Funktionsname und die die zugehörige Dokumentation, können sich in zukünftigen PHP-Versionen ohne Ankündigung ändern. Seien Sie gewarnt und verwenden Sie diese Funktion auf eigenes Risiko.

Parameter-Liste

method

Name of the method to call.

params

Method parameters compatible with method signature.

output_options

Array specifying output options may contain (default values are emphasised):

  • output_type: php, xml

  • verbosity: no_white_space, newlines_only, pretty

  • escaping: cdata, non-ascii, non-print, markup (may be a string with one value or an array with multiple values)

  • version: simple, xmlrpc, soap 1.1, auto

  • encoding: iso-8859-1, other character set supported by iconv

Rückgabewerte

Returns a string containing the XML representation of the request.

Beispiele

Beispiel #1 XMLRPC client functions example

<?php
$request 
xmlrpc_encode_request("method", array(123));
$context stream_context_create(array('http' => array(
    
'method' => "POST",
    
'header' => "Content-Type: text/xml",
    
'content' => $request
)));
$file file_get_contents("http://www.example.com/xmlrpc"false$context);
$response xmlrpc_decode($file);
if (
$response && xmlrpc_is_fault($response)) {
    
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
} else {
    
print_r($response);
}
?>

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

U4GM Pinpoint Pitching Guide for MLB The Show 26

Pinpoint Pitching in MLB The Show 26 can feel brutal when you're first trying to command it, especially if you're aiming to live on the black and ...

Geschrieben von Andrew736 am 16.04.2026 08:35:33
Forum: User stellen sich vor
U4GM How to Progress Fast in Arknights Endfield

Early on, Arknights: Endfield throws a lot at you, and that's usually where people lose time. I made that mistake too. I spent ages poking around ...

Geschrieben von Andrew736 am 16.04.2026 08:34:24
Forum: Archiv / Trash
U4GM Black Ops 7 Zombies Boss Fight Tips That Work

If this boss has been wrecking your runs, trust me, I get it. I went into it thinking damage was everything, then kept getting folded in the later ...

Geschrieben von Andrew736 am 16.04.2026 08:32:00
Forum: Out of Order
U4GM What Speeds Up Pollen Grinding in Bee Swarm Simulator

I didn't really understand efficient grinding in Bee Swarm Simulator until I got stuck on mid-game gear and started wasting whole sessions in the ...

Geschrieben von Andrew736 am 16.04.2026 08:31:00
Forum: Off-Topic Diskussionen