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 7439187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:40:11+00:00 2026-05-29T10:40:11+00:00

The Post looks like this. $data = array(‘icd9’ => $icd9, ‘cpt’ => $cpt, ‘session_id’=>

  • 0

The Post looks like this.

 $data = array('icd9' => $icd9, 'cpt' => $cpt, 'session_id'=> $session_id);
    $url = $api_location."rarity/".$session_id;
    $params = array('http' => array('method' => 'POST', 'content' => $data));
    $ctx = stream_context_create($params);
    $fp = @fopen($url, 'rb', false, $ctx);
    if (!$fp){
       return "Error";
    }
    $response = @stream_get_contents($fp);

    $results = $response;//json_decode($response);

    return $results;

The Block on the api_location server looks like this:

if ($_POST['session_id']){
    $fh = fopen('/interaction/rarity_req/alive.txt','w');
    fwrite($fh,'\r\n'.date("Y-m-d - H:i:s"));
    fclose($fh);
    $session_id = $_POST['session_id'];
    $cpt = $_POST['cpt'];
    $icd9 = $_POST['icd9'];
}else{
    $fh = fopen('/interaction/rarity_req/died.txt','w');
    fwrite($fh, '\r\n'.date("Y-m-d - H:i:s"));
    fclose($fh);
}

Any Ideas? I know I could install cURL to do this, but was trying to avoid it if at all possible because this is so simple. Was basing it off of this blog post: http://wezfurlong.org/blog/2006/nov/http-post-from-php-without-curl/

  • 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-29T10:40:13+00:00Added an answer on May 29, 2026 at 10:40 am

    Turn your data into a URL-encoded string:

    $params = array('http' => array('method' => 'POST', 'content' => http_build_query($data)) );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to send data using $.ajax like this: $.ajax({'url': 'my.php', 'type': 'POST',
My ajax request looks like this: $.post('newsletter.php?mode=grab', { search: searchstring }, function(data) { $('#newsletter_receivers').html(
I have a query that looks like this: public IList<Post> FetchLatestOrders(int pageIndex, int recordCount)
I have a simple form that looks like so <% remote_form_for post, :url =>
I have an an ajax request that looks like this, $('input.fakecheck').click(function(){ alert(deleteing....); $.ajax({ url:/search,
I have a JAVASCRIPT array that looks like this: postarray['min_price'] = 120000; postarray['max_price'] =
I've got a form which looks like that: <form method=post enctype=multipart/form-data onsubmit=return new_post_form_submit();> <input
I want to do an HTTP POST that looks like an HMTL form posted
I need to read in an Intel Hex file which looks something like this:
I have created a JS array like this var detailsArr = new Array(); and

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.