Forum Moderators: coopster

Message Too Old, No Replies

how to call a form from a php template

         

the_nerd

3:55 pm on Aug 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd like to use form parameters to exchange data between servers:

The main server holds userid + hashed password

In order to get user information on another server I created a page that looks for form-parameters, does some security checking and then outputs the requested data in text format.

How do I send the post request to the Server? In coldfusion I can use cfhttp and add some parameter values, but in php all I found so far is fsockopen and then send everything with fputs. This works from php to php. But when I send the request with php to my main server (running coldfusion) I get a 400 (bad request error)

What would be the correct way to move the post parametes over? Thanks for any hints.

coopster

4:20 pm on Aug 28, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



fsockopen() [php.net] opens a raw socket, it has nothing to do with what's on the other end as far as the server-side technology goes. You can open a socket using this function or perhaps curl [php.net] will meet your needs. Either way will allow you to POST form data and either way you can read the results back from the requested server. Your issue seems to lie in the CF code.

My recommendation would be to get it working fine within your own pages in a simple test first, then move on to requesting from your CF site pages.