Jump to content
Sign in to follow this  
alwaysZeroHour

Convert string to querystring format

Recommended Posts

alwaysZeroHour

Hi

I have a string with alot of new lines etc in it.

I pull the string using:

$foo = Run(@ComSpec & " /c net user "& @username &" /domain", @SystemDir, @SW_HIDE,$STDOUT_CHILD)
$groupstring = ""
While 1
    $groupstring &= StdoutRead($foo)
    If @error = -1 Then ExitLoop
Wend

It retrieves the user groups but I would like to submit it to a webpage on our intranet but InetGet does not execute if I add the var $groupstring to the query.

Is there a "url_encode" function like that found in PHP to convert the string to a same querystring format?

Or can I use get/post to send the data with proper formating?

Thanks for any help.

Cheers


Z

Share this post


Link to post
Share on other sites
jvanegmond

Instead of InetGet use a _IECreate, it's like if you paste the url in the browser.. only automated. That would probably work.

Share this post


Link to post
Share on other sites
jvanegmond

Instead of InetGet use a _IECreate, it's like if you paste the url in the browser.. only automated. That would probably work.

Share this post


Link to post
Share on other sites
alwaysZeroHour

It encodes it correctly but it does not cure the problem.

I am starting to suspect the function inetget has a url limitation but thats unconfirmed yet.

Cheers


Z

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×