[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I may have missed something ...
This is a little special ting, I'm trying to log into the an Iseries
Session on the same server I got the request from:
serverAddr = %trim(getExtEnvVar('SERVER_ADDR'));
serverPort = %trim(getExtEnvVar('SERVER_PORT'));
ts = %char(timeStamp());
iceCapUrl = 'HTTP://'
+ serverAddr
+ ':'
+ serverPort
+ '/icecap/login.asp?user='
+ %trim(user)
+ '&password='
+ password
+ '&ts='
+ ts;
filename = http_tempfile() + '.txt';
rc = http_url_get(iceCapUrl:filename);
I'm in the middle of basically a CGIDEV2 progtam and recieves back:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
<P>The document has moved <A
HREF="http://192.168.90.100:7050/login.asp?user=demo&password=demo
">here</A>.</P>
</body></html>
No problem, I just read the HTML document an make a recall ...
xmlFromStmf(filename);
xmlReaderInz(xmlAddr:xmlSize);
xmlReaderCase('L');
dow xmlReader = 0;
select;
when xmlGetNode = 'a' and xmlGetAttr = 'href';
redirectUrl = xmlGetData;
leave;
endsl;
enddo;
xmlFree();
filename = http_tempfile() + '.txt';
rc = http_url_get(redirectUrl:filename);
if (rc <> 1);
dsply 'HTTPAPI: An error occured in the iceCap call 2';
return;
endif;
BUT !!! is there anyway I just can retreive the http_url_get %addr and
%size,
so I dont have to store the result in a IFS file before reading it ?
Regards
Henrik
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------