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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:02:57+00:00 2026-05-21T09:02:57+00:00

I have two pages, one sending a file_get_contents request: $postdata = http_build_query( array(‘install’ =>

  • 0

I have two pages, one sending a file_get_contents request:

$postdata = http_build_query( array('install' => 'true', 'url' => $_SERVER['SERVER_NAME'], 'key' => 'XXXXXXXXXXXX') );

$opts = array('http' =>
    array(
        'method'  => 'POST',
        'header'  => 'Content-type: application/x-www-form-urlencoded',
        'content' => $postdata
    )
);

$context  = stream_context_create($opts);
$registration_key = file_get_contents('http://example.com/register.php', false, $context);

And a page that receives the call (http://example.com/register.php) and I am trying to grab the IP of where the request is coming from to no avail. I have tried:

$_SERVER['HTTP_CLIENT_IP']

$_SERVER['HTTP_VIA']

$_SERVER['HTTP_X_FORWARDED_FOR']

$_SERVER['REMOTE_ADDR'] (IP, but not the IP of the computer sending OR receiving the request)

Any idea as to where I can find more info on the computer sending the request?

Thanks in advance!

  • 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-21T09:02:58+00:00Added an answer on May 21, 2026 at 9:02 am

    Only if you will pass IP in request:

    $registration_key = file_get_contents('http://example.com/register.php?ip='.$_SERVER['REMOTE_ADDR'], false, $context);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two pages. First one we open with $_POST variables in its url,
I have two pages that inherit from one master page, First.aspx or second.aspx. Navigation
I have two php pages. Page 1 contains one form which i submitted with
We have some web pages which have two frames, with one frame in the
I have two pages one is the main page and the another one is
I have two pages name one.php and two.php in one.php i have a combo
I have two web pages: one consists of four asp.net text boxes and one
I have two pages: the main one calls the other via AJAX to get
Have JSF 1.2 two pages(one.xhtml and other.xhtml), that are included to the current page
I have two pages. One with the select boxes on and the send button.

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.