Forums

API Password using CURL plugin

aef03 12 Oct, 2009
I want to use the CURL plugin to post to another system.

The other system requires an API password and user name.

I was hoping I could type these under "Target URL" so that they are not stored anywhere the user can see them.

It *seems* like the only way to do it is hidden fields on the form - but then the user could see these fields by viewing HTML source.

Is there a way to hardcode a few fields onto the CURL post so that they are not available to the user in any way?

Thanks,
D.
GreyHead 13 Oct, 2009
Hi aef03,

In the Extra Fields Data box you can enter values for fields that will be the same for each submission. These will often be client or transaction identifiers for the other site. (Note: Putting this information here means that it is never exposed in your form.)

From the Help tab.

Use the syntax:
parameter1=value1
parameter2=value2

Bob
aef03 13 Oct, 2009
Thanks for your prompt response!
As per Murphy's law of message board posting I found it only after I had posted my "how do you turn it on" question.

D.
aef03 13 Oct, 2009
When I add quotes around data values and save it, the system adds the backslash escape. However, it does this for every save - so they start stacking up.

How do I enter literal values instead of field mappings as the help indicates?

Thanks,
D.
GreyHead 13 Oct, 2009
Hi aef03,

Can you give me an example - I don't understand where you are putting the quotes??

Literal values go in the textarea as in the little example in my last post.

Bob
aef03 13 Oct, 2009
Maybe I'm doing something wrong - but the debug output does not show any of the fields I've been adding using the method in this thread. The regular fields show in debug just fine.

Thanks for any help,
D.
aef03 13 Oct, 2009
Sorry I didn't catch the update you had made. In the Extra Fields Data box I am putting

api_pass="mypassword"
extra_data="data with space"

The info for the field (by hover the "i") gives examples of setting field name to a field name.

As per my previous post, debug isn't showing anything from this field coming through at all.

Thanks,
D.
GreyHead 13 Oct, 2009
Hi aef03,

Please post a sceenshot or some kind of example. I can't visualise what's happening here.

Bob
aef03 13 Oct, 2009
I have attached two screen shots. This one shows the escape characters accumulating - after two saves there are three slashes.
[attachment=1]accumulating escape characters.png[/attachment]

The next one shows that none of the fields specified seem to be coming through on the debug information:
[attachment=0]no_extra_fields.png[/attachment]

Maybe I am misunderstanding the debug output?
GreyHead 13 Oct, 2009
Hi aef03,

Take the quotes out, they most likely aren't needed and the problem will go away (if they are neeeded then try urlencoded values).

The debug info you have posted is the debug when the form is submitted before the cURL is called so it's correct that the fields are empty.

Bob
aef03 13 Oct, 2009
OK.
I turned on curl debugging as well - where would I find the debugging info for it?

Thanks,
D.
GreyHead 13 Oct, 2009
Hi aef03,

Just checked the code, they should show on the page after you submit - along with the normal ChronoForms debug messages.

Bob
aef03 13 Oct, 2009
They do not show - I only see what you can see in the screenshot in this post.

Where would I look to see if there are problems with Chronos handing off to curl?

I find nothing in httpd logs.

Thanks,
D.
GreyHead 13 Oct, 2009
Hi aef03,

If you aren't seeing anything then my guess is that you haven't got the Plugin enabled on the form Plugins tab - if the plugin is enabled it will show a green bar with an 'x' icon.

Bob
aef03 13 Oct, 2009
On the "plugins" tab for the form I have "curl" checked (Screenshot)

[attachment=0]plugins.png[/attachment]

Where should I see the green bar with the "x" - in debugging info?
GreyHead 13 Oct, 2009
Hi aef03,

That's fine - you have an older version of ChronoForms - the green bars came in the last release or so.

Bob
aef03 13 Oct, 2009
OK,
So curl still doesn't seem to be working and I don't get any debug output despite having it turned on for the form.

D.
aef03 13 Oct, 2009
I upgraded from RC5.0 to RC5.5 and both debugging and the actual posting work fine.

Thanks for your great software.

D.
GreyHead 14 Oct, 2009
Hi aef03,

Excellent, sorry I didn't think to ask about the version earlier.

Bob
This topic is locked and no more replies can be posted.