Jump to content
Sign in to follow this  
oren

Passing True newline

Recommended Posts

oren

Helo I'm in a need to pass a true new line to curl. In a Run command

$Llinks1 = "http://fdsfsdfs" & @crlf & "http://fdsfdsfsd.dsfsd"

$iPidCurl = Run(@ComSpec & " /c " & 'curl --trace trace.txt -F "sess_id='&$sessId[0]&'" -F "upload_type=url"  -F "url_mass='&$Links1&'" -F "submit_btn= Upload! " "http://'&$server[0]&"/"&$Fost[0]&'/"', @ScriptDir, @SW_HIDE,2+4)

andd I'm getting a error..

Now I've sent a e-mail to curl asking if theres is a way to do it and my answer was.

> -----------------------------150063110124393
> Content-Disposition: form-data; name="url_mass"
>
> http://fdfsdf
> http://gdfgdfg
> -----------------------------150063110124393
>
> I know the line should go like this
>
> curl -F "url_mass= $Links" $URL
>
> But how do I state new line between links?

[b]You pass a true newline. [/b]

How can I pass a true newline?, How do I make the autoit understand that it should pass a true newline and not to just a newline in the code..

Anyone has any idea?

Edited by oren

Share this post


Link to post
Share on other sites
Mobius

These are just stabs in the dark but have you tried...

$Llinks1 = "http://fdsfsdfs" & @lf & "http://fdsfdsfsd.dsfsd"

or

$Llinks1 = "http://fdsfsdfs" & Chr(10) & "http://fdsfdsfsd.dsfsd"

or separate the links with ";" semicolon character

"http://fdsfsdfs;http://fdsfdsfsd.dsfsd"

What does it say about "url_mass" in the curl man page?

curl --manual
Edited by Mobius

Share this post


Link to post
Share on other sites
oren

[

These are just stabs in the dark but have you tried...

$Llinks1 = "http://fdsfsdfs" & @lf & "http://fdsfdsfsd.dsfsd"

or

Only @lf will not work there is a need for a @crlf , and as I said before the run box interrupt the @crlf as a "enter". , And i get a

curl: no URL specified! <-- respond.

$Llinks1 = "http://fdsfsdfs" & Chr(10) & "http://fdsfdsfsd.dsfsd"

Tried now and it didnt worked( I've tried $Llinks1 = "http://fdsfsdfs" & Chr(13) & chr(10) & "http://fdsfdsfsd.dsfsd"

or separate the links with ";" semicolon character

"http://fdsfsdfs;http://fdsfdsfsd.dsfsd"

Its just try to send the semicolon as part of the link...

What does it say about "url_mass" in the curl man page?

curl --manual

As I said I sent the developer a e-mail and he responded

You pass a true newline. With multipart posts there's no encoding involved.

It might be easiest with something like curl -F "user_mass=<readfrom" $URL, 
where 'readfrom' is the name of the file holding the list of newline separated 
urls.

I tried using his read from file option and it worked, But I dont want to write the links in a file and then to read from the file,

I want it to be direct.

Edited by oren

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  

×