Couple of post data questions
cherub
SERnuke.com
1) I'm attempting to script a site that accepts data in JSON format, {"variable":"data"} etc, but obviously SER takes everything in the { } curly brackets as spintax and the result is that the brackets get stripped out. I tried escaping them with a backslash \ but this had no effect. Is there any way to use curly brackets in post data?
2) As part of above I also need to include a captcha value in the post data string. Usually this would be %captcha% followed by a url for the captcha on the form page, but as this is using post data it can't be done this way. I've set up an extract to get the url of the captcha, and thought that I could use %captcha% %extracted_captcha_url% in the post data, but whilst the %extracted_captcha_url% is replaced correctly, %captcha% just stays as it is. Is there any way to use %captcha% in post data?
Sorry for the waffle, and thanks in advance for any answers, c
2) As part of above I also need to include a captcha value in the post data string. Usually this would be %captcha% followed by a url for the captcha on the form page, but as this is using post data it can't be done this way. I've set up an extract to get the url of the captcha, and thought that I could use %captcha% %extracted_captcha_url% in the post data, but whilst the %extracted_captcha_url% is replaced correctly, %captcha% just stays as it is. Is there any way to use %captcha% in post data?
Sorry for the waffle, and thanks in advance for any answers, c
Tagged:
Comments
1) Indeed this is a problem. Never came across a site that needed this. Try using "encode post data=0".
2) Should be possible like post data=ur_var=%captcha% fixed:%get_full_captcha_url%
In the post data string I include %captcha% fixed:%captcha_url% as you stated above, but what ends up being sent according to the debug window is:
%captcha% fixed:http://www.domain.com/url-to-captcha.php
...so the %captcha% variable doesn't seem to be recognised. Can you offer any insight?
The post data I'm sending is this:
data=%22captcha%22%3A%7B%22value%22%3A%22%captcha% fixed:%captcha_url%%22%7D
which when not url-encoded is this
data="captcha":{"value":"%captcha% fixed:%captcha_url%"}
Cheers for any help