Simple PHP scripts to post to or receive from API endpoint (urgent)

Job ID: 32288410

Budget: $10 – $30 USD

I'm working on an API but I'm very new to this. Can you help me with the following?

- I need a simple PHP script that posts data to a URL, so I can access the data through the $_POST variable on the other end. For example:
$_POST['name'] = 'Joe'; needs to be posted to the URL www.testendpoint.com/test.php so I can access $_POST['name'] on that page.

- I need a 2nd PHP script that posts a Bearer Token via the header to another URL/endpoint.

- I need a 3rd script to access the above token on the other end.

Where needed, JSON format can be used to post or retrieve the data.

This is a small but urgent project so I need someone who replies fast as soon as I accept the offer.