Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6980131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:58:30+00:00 2026-05-27T17:58:30+00:00

There are a few things I need help understanding. Long story short: Client has

  • 0

There are a few things I need help understanding. Long story short: Client has 3rd party application to handle user registration/mailing list/gift cards, it is my job to collect user data, format it in specific JSON object and send to their server. One additional requirement is to pass a username:password header encrypted with base64.

Now, I have a PHP script which is correctly building the JSON object as per their specifications, but I am required to send the POST data to their server, an external web server, along with the mentioned HTTP user authentication header.

So uh, what do I do? I had originally thought to send a PHP header to the client, like so:

Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

But that’s not meant to go to the client. That is meant to go to an external server. Am I supposed to make the client send this header (using javascript)? How can PHP communicate with another server? And finally, how would I send the JSON object to that server, apparently in the same message as the authentication header?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:58:30+00:00Added an answer on May 27, 2026 at 5:58 pm

    I think cURL is what you need. You can read about it here:
    http://www.php.net/manual/en/book.curl.php

    With cURL you can easily make HTTP requests including Post, Cookies and lots of other stuff. The JSON object would probably just be sent as one of the Post values, that depends on the API they’ve given you, though.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know how to use locks in my app, but there still few things
There are a few things that I almost always do when I put a
I am switching to textmate and there are a few things I want to
I have an asp.net website that uses forms authentication. There are a few things
I need some help with GUI Iphone development I am currently develop iphone application
I recently started working with CakePHP but there are a few things I don't
It looks like there a few working solutions for using custom true type fonts
There are a few ways to get class-like behavior in javascript, the most common
There are a few books about specific ORM products such as Hibernate or Linq
There are a few questions on SO already regarding LINQ pivots and while a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.