J'utilise le client XML RPC de la bibliothèque Zend dans une application PHP pour extraire des données d'un autre serveur via XML RPC. Cependant, l'autre serveur utilise l'authentification de base HTTP. Comment puis-je dire au client XMLRPC d'utiliser l'authentification pour les demandes? En interne utilise un Zend_Http_Client
qui gère la communication HTTP de base.Authentification HTTP avec le client Zend XML RPC de PHP
1
A
Répondre
4
Zend_XmlRpc_Client
Vous pouvez récupérer le client HTTP avec:
$httpClient = $rpcClient->getHttpClient();
et vous pouvez définir les paramètres d'authentification requiert:
$httpClient->setAuth($username, $password, Zend_Http_Client::AUTH_BASIC);
Questions connexes
- 1. Zend Framework XML-RPC?
- 2. Client PHP Zend XML-RPC - "Type inconnu: i8" lors d'une requête avec Zend_Crypt_Math_BigInteger?
- 3. XML-RPC PHP Java
- 4. Serveur HTTP Python avec XML-RPC
- 5. PHP Zend XML-RPC - Un moyen de désactiver le «nul» dans les demandes?
- 6. Méthodes d'authentification pour le serveur XML-RPC de Zend Framework
- 7. Comment utiliser XML-RPC metaWeblog.newPost correctement avec PHP?
- 8. Simple, mais avancé XML-RPC sur PHP?
- 9. XML-RPC avec java
- 10. Authentification HTTP avec références Web
- 11. authentification HTTP et l'authentification PHP
- 12. Http authentification avec apache httpcomponents
- 13. Possibilité de télécharger un fichier via le client HTTP Zend?
- 14. XML-RPC avec PHP et GoDaddy? La confusion règne dans
- 15. Commande HTTP Post avec requête XML (PHP)
- 16. Authentification SOAP avec PHP
- 17. Qt Authentification HTTP avec QNetworkAccessManager
- 18. Zend Authentification Problème avec sous-domaine
- 19. Méthode client RPC la plus simple en PHP
- 20. Authentification Digest avec Jersey Client
- 21. Lent XML-RPC dans Windows 7 avec XML-RPC.NET
- 22. authentification http de base avec django-piston
- 23. TouchJSON avec authentification HTTP de base
- 24. Joomla XML-RPC & .NET
- 25. REST/JSON/XML-RPC/SOAP
- 26. authentification HTTP de base
- 27. Activer XML-RPC dans PHP.ini
- 28. Appel Ruby Soap XML-RPC très lent!
- 29. Authentification Blackberry MD5 avec HTTP Post
- 30. allow_none dans le serveur XML-RPC tordu