?
Solved

php post to asp.net from code behind

Posted on 2014-02-21
3
Medium Priority
?
464 Views
Last Modified: 2014-03-20
Hello, I am using oscommerce as my store.  What I'm looking to do is, when my customer submits an order; I would like to submit a separate request from the php checkout to an asp.net page from code behind.  So basically, post the transaction data, and if approved, post again to a separate custom url of mine on the backend.   Could someone tell me the best way to do this with php?
0
Comment
Question by:jtmerch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39877811
cURL is the standard method of posting to an external URL. You can set it to wait for the response and then fire another cURL to your own URL when finished.
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 1500 total points
ID: 39877947
You can do this.  It will be necessary to modify or add a hook into the PHP checkout.  If you're not a skilled PHP programmer you almost certainly want to hire a professional to make these modifications.

There are two ways to make a POST-method request in PHP.  One is to use cURL and the other is fsockopen().  In either method, a URL-encoded request string is required.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39943407
Wow, haven't heard from you for a month, then a bad grade?  What was wrong with the answer?  Please see the Experts-Exchange grading guidelines and then explain why you didn't engage in any dialog and why you marked the grade down.  Looking forward to understanding, ~Ray
http://support.experts-exchange.com/customer/portal/articles/481419
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question