How to insert post information without a form

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
Mariacha
Forum Newbie
Posts: 1
Joined: Tue Aug 14, 2007 10:10 am

How to insert post information without a form

Post by Mariacha »

I am relatively new with web design so I don't even know exactly what to ask here, but this can't be as hard as I am making it.

I am a merchant and I want to pass just a few simple strings to the credit card processor: my merchant ID and pin, as well as a price and a few other simple variables.

I want the merchant ID and pin to be invisible to the user.

All the examples the credit card processor gives are simple html forms sent via the post method where the variables are in hidden fields. Obviously, I can't send the merchant ID and pin via a hidden field without this information being visible to the user in the source code.

What I have tried so far is something I really don't understand: creating a post "stream" through an intermediary php page that should then load the credit card page. For this I used fsockopen and fputs. But the page never actually loads the credit card processor's site. In fact, the most successful run of this simply loads the intermediate php page as a blank white page with blank white source code. Perhaps I am missing whatever it is that sends you to the credit card processor?

Is there a better way to do this?

I have read some things about server-side cookies, but I don't know if these avoid showing the user your information?

Is there another way to get these variables to the credit card processor other than post? (As I said, the only examples they gave me were form "posts").

If there is no better way, could someone at least point me to a description of just what exactly you need to include in a faked "post" stream?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Look into cURL and its ilk.
Post Reply