<url>http://www.mytracker.ru/track.php?query=</url>
<xsl:value-of select='substring-after(., "http://heverest.ru/" )' />
<yml_catalog date="2012-09-03 20:30">
<shop>
<name>....</name>
<company>...</company>
<url>http://www.heverest.ru</url>
<?php
$xml = '<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>xxxx</ApiKey>
<Data xsi:type="Subscriber">
<Mode>AddAndUpdate</Mode>
<Force>false</Force>
<ListId>1</ListId>
<Email>aa@aa.aa</Email>
<Firstname>name</Firstname>
</Data>
</ApiRequest>';
$ch = curl_init();
$data = array('Content-Type: text/xml; charset=utf-8');
curl_setopt($ch, CURLOPT_URL, "https://mysite.com/api?"+$xml);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response=curl_exec($ch);
curl_close($ch);
print_r($response);
?>
WebRequest request = WebRequest.Create("https://mysite.com/api");
request.Method = "POST";
string postData =
@"<ApiRequest xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xs=""http://www.w3.org/2001/XMLSchema"">
<ApiKey>xxxx</ApiKey>
<Data xsi:type=""Subscriber"">
<Mode>AddAndUpdate</Mode>
<Force>false</Force>
<ListId>1</ListId>
<Email>aa@aa.aa</Email>
<Firstname>name</Firstname>
</Data>
</ApiRequest>";
byte[] byteArray = Encoding.UTF8.GetBytes(postData);
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
dataStream.Close();
try
{
WebResponse response = request.GetResponse();
}
catch (WebException ex)
{
// using (Stream data = ex.Response.GetResponseStream())
// {
// string text = new StreamReader(data).ReadToEnd();
// Response.Write("<br><br>" + text);
// }
}
такой htaccess
при таком роутере
работает без ошибок