0

one of my vendor he is asking a posting page where he can send some varaibles from his portal which is in asp.net.

My website is in php. what posting page i should be providing him and how to fetch whatever he is sending.

Pavel_K
  • 10,748
  • 13
  • 73
  • 186
prem
  • 241
  • 2
  • 11
  • 3
    I think the _vendor_ is requesting an API. A webservice so they can interact with, not simply a page to post data to... – FirstOne Nov 21 '17 at 13:31
  • Basically they're asking for any .php file, in which you read data from `$_POST`. The basics of any regular HTML form processing, minus the HTML form. – deceze Nov 21 '17 at 13:45

2 Answers2

1

You may disable the CSRF validation (if you have any) to achieve this task. However the standard way is to create webservice to achieve this goal.

The best and easiest API to implement is RESTful. Here is reference to that:

How to create a simple REST API in PHP

Creating a simple REST API in PHP

TheDevWay
  • 1,363
  • 1
  • 16
  • 45
0

It doesn't matter what language the vendor use or what you use...

He need to you to specify him what is your script URL that you allow him and expect POST request from him to do what he need.

If it's from his server side (for example in PHP we use curl),

so he need to use asp.net way to post request...

maybe this will help him how to do it

How to make HTTP POST web request

If he doing those request from client side (ajax),

so he can use jQuery http://api.jquery.com/jquery.ajax/

and in your side to allow in the php script the "access control allow origin"

see:

how to bypass Access-Control-Allow-Origin?

shushu304
  • 1,506
  • 1
  • 7
  • 15