Moin zusammen,
Danke für die Hilfe d0nut - aber ich bekomme auch mit deinem Code die alte Antwort "access denied" - das liegt aber nicht an falschen Zugangsdaten sondern daran das er mit meinen übergebenen Daten ein Problem hat, er kann Sie nicht lesen.
Ich weiß nicht wirklich weiter, nicht mal wie ich um Hilfe fragen soll.
Hier nochmal mein derzeitiger Code:
Hier mein XML File welches ich dem CURL mitgebe:
|
XML Code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE outbound
SYSTEM "http://webservices.provider.net/xml2fax/1.1/outbound.dtd">
<outbound
customer-id="999999999"
auth-method="basic"
auth-string="ueDhrvGt1rfq1q9qvvutwpauepmifn"
user-id=”Marketing Dept.”
header=”ACME INC.”
confirmation-url="mailto://temp@tempuri.org">
<recipient
transaction-id="b31b8793-abaf-11d5-c450-c7fcf46a01f5"
name="John Doe"
company="Doe-A-Deer, Inc"
destination=”15551239876”/>
<document
content-type="text/html"
content-transfer-encoding="base64">
gyutmtizndvyqfbktcbtrvqguefhrvbst1rfq1q9qvvutwpauepmifnfv....
</document>
</outbound>
|
Und hier das PHP Script welches ich im Browser öffne:
|
PHP Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
|
<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://webservices.provider.net/xml2fax/1.1/send.asp");
curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents('request.xml'));
$antwort= curl_exec($ch);
curl_close ($ch);
var_dump($antwort);
var_dump(file_get_contents('request.xml'));
?>
|
Die Antwort des Servers lautet immer:
string(19) "Access is denied. " string(624) " gyutmtizndvyqfbktcbtrvqguefhrvbst1rfq1q9qvvutwpauepmifnfv.... "
Für mich sieht es so aus als wäre das XML das ich ihm gebe nicht valide ... sollte es aber sein, denn es ist das original aus der Anleitung des Herstellers der den XML Server vorhält. Ich checks wahrscheinlich einfach mal nur nicht, weiß noch jemand weiter?
Grüße,
Matze