$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'url');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT , $userAgent);
$data = array();
$data['UserName'] = $nameUsername;
$data['Password'] = $namePassword;
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: application/x-www-form-urlencoded; charset=UTF-8", 'Connection: Keep-Alive','Keep-Alive: 300'));
curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$result=curl_exec($ch);
$doc = new DOMDocument();
$doc->loadHTML($result);
$xp = new DOMXpath($doc);
$nodes = $xp->query('//input[@name="wa"]');
$node = $nodes->item(0);
$wa = $node->getAttribute('value');
$nodes = $xp->query('//input[@name="wresult"]');
$node = $nodes->item(0);
$wresult = $node->getAttribute('value');
curl_setopt($ch, CURLOPT_URL, 'url1');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT , $userAgent);
$data = array();
$data['wa'] = $wa;
$data['wresult'] = $wresult;
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
//curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-type: application/x-www-form-urlencoded; charset=UTF-8", 'Connection: Keep-Alive','Keep-Alive: 300'));
curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
$data=curl_exec($ch);
echo $data;
должен отправлять такое
$wa = 'wsignin1.0'
$wresult= '<trust:RequestSecurityTokenResponseCollection xmlns:trust="http://docs.oasis-open.org/ws-sx/ws-trust/200512"><trust:RequestSecurityTokenResponse><trust:Lifetime><wsu:Created xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">2015-01-23T19:41:38.429Z</wsu:Created>................'
_____________
Womans in your town