Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   parsing reply from inetc (http://forums.winamp.com/showthread.php?t=266275)

drod 21st February 2007 07:37

parsing reply from inetc
 
Hi, I trying to use inetc to register to establish a connection to a server, register some details and obtain the the confirmed registration details from the post_reply.

For example, connect with
inetc::post $registrationStr ${REGISTER_CMD} "post_reply.html"

...get this post_reply back...

<html>
<title>Process Registration</title>
<body>
<p>REG_ID=1020</p>
<p>REG_DATE=20070215</p>
</body>
</html>

I was looking for a function that would allow me to pass a key and a seperator in, strip off any unnecessary characters and retrun the key value - say something like:

push "REG_ID" ; the string to look for
push "=" ; the key seperator
call getKeyValue ; answer is "1020"

That way I may also be able to use the same func to parse something like:

<html>
<title>Process Registration</title>
<body>
<p>REG_ID=1020 REG_DATE=20070215</p>
</body>
</html>

Does anyone know if something like this is available?
Thanks.

Takhir 21st February 2007 13:44

If you cannot change script (PHP or something else) on server use XML on this (client) side http://forums.winamp.com/showthread....hreadid=227162

drod 21st February 2007 18:13

thanks for that.
I'll take a look at both options - server and client side.

Afrow UK 21st February 2007 23:00

It would be easiest to change the PHP output to a standard INI file (if you have access), i.e.
code:
[Registration]
REG_ID=1020
REG_DATE=20070215


You can simple use ReadINIStr then.

-Stu


All times are GMT. The time now is 04:37.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.