|
|
#1 |
|
Junior Member
Join Date: Jan 2007
Location: UK
Posts: 9
|
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. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
If you cannot change script (PHP or something else) on server use XML on this (client) side http://forums.winamp.com/showthread....hreadid=227162
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2007
Location: UK
Posts: 9
|
thanks for that.
I'll take a look at both options - server and client side. |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
It would be easiest to change the PHP output to a standard INI file (if you have access), i.e.
code: You can simple use ReadINIStr then. -Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|