cURL / Mailing Lists / curl-users / Single Mail

curl-users

Redirect [2]

From: Nakayama Kazuhiko <tradestation_at_hotmail.com>
Date: Sun, 27 Apr 2008 00:48:10 +0900

hello, again , all ^^
( From japan, This is Nakayama ) 1/From http header, I want to get a string.I want to receive this data..Location: ........http://redirect address_URL(2)......... 2/first, I access a URL(1). This address will return a 'Location' address URL(2) for next direct. 1) Access to URL(1)2) if ( Login success ) { I will receive redirect address URL(2) }3) if ( Login faild ) { I will receive a XML } I want to do programing like this.Here is part of my code. curl_easy_setopt( easyhandle, CURLOPT_FOLLOWLOCATION,1 ); curl_easy_setopt( easyhandle, CURLOPT_URL, URL_1 ); curl_easy_setopt( easyhandle, CURLOPT_PORT, 8000 ); curl_easy_setopt( easyhandle, CURLOPT_WRITEFUNCTION, xmlfun ); curl_easy_setopt( easyhandle, CURLOPT_WRITEDATA, &xml ); res = curl_easy_perform( easyhandle ); 3/My Question is two.Q1) HOw to get string 'Location: ***' ?Q2) How to get XML or redirect address.... there is 2 senario , it depend on login faild or success....
_________________________________________________________________
$B!Z(BMSN$B%S%G%*![D65.=E!*6C$-$NBgJ*BPCL$,<B8=!#:n2H(B $BB<>eN6$,OCBj$N$"$N?M$KGw$k(B
http://video.msn.co.jp/rvr/default.htm
Received on 2008-04-26