473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

$http_response_header differs depending on OS

Hi there,

I hope somebody can help me: I'm making a HTTP request to a source
where I get redirected. Let's assume this page is
"https://www.example.com" and it redirects me to
"https://www.example.com/redirect.html". My request looks like this:

$html = file_get_contents('https://www.example.com');

Now, when I print out $http_response_headers I get different output on
MacOS/Linux and Windows:

MacOS/Linux:

HTTP/1.1 302 Found
Connection: close
Date: Mon, 26 Feb 2007 15:28:46 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: /redirect.html
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 266
HTTP/1.1 200 OK
Connection: close
Date: Mon, 26 Feb 2007 15:28:46 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 7830

Windows:

HTTP/1.1 200 OK
Connection: close
Date: Mon, 26 Feb 2007 15:28:46 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 7830

So on Windows I only get the header of the last page I was redirected
to. But I need all the headers on Windows.

Does anybody know which setting is responsible for that? In both cases
(MacOS 10.4 and Windows XP SP2) I am using the latest XAMPP.

Feb 26 '07 #1
0 1597

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tobias Erbsland | last post by:
Hello I have a problem with an error message. I created a new class (as OpenSSL helper): class DataBlock { public: DataBlock(); DataBlock( unsigned int size );
10
by: blimeyoreilly | last post by:
Hi I've a small problem .. can anyone figure it out? I am working in VS.NET in C++ with MFC. I have a CWinApp-based class called CTestHarnessApp. I keep getting the 'differs in levels of...
6
by: Bern McCarty | last post by:
I'm trying to use the VS 2005 March Tech Preview and am trying to adjust some MC++ to the new C++/CLI syntax. I got a little hung up when I encountered the below error. Certainly my...
0
by: Liorm | last post by:
Hi, I found URLEncode differs in ASP and ASP.NET - when I encode "-" in ASP it gives me %2D, and in ASP.NET it gives me "-". Why? Does it happen with other characters? And how can I get the...
6
by: Angus | last post by:
I am using a global which is a void* I have it defined in one file as: void* hFlag; and one other header file as: extern void* hFlag; But I get this compile error:
8
by: asd | last post by:
Hello all. I was doing some kind of development and in the test file I have something like this: ///// Test File ///// double x = sin(45); The output for that statement is:
16
by: Josef Dalcolmo | last post by:
I tried this on Windows only: In Python 2.4 os.path.getmtime returned the local time, in Python 2.5 it seems to return GMT: import os, time print ctime.time(os.path.getmtime(foo)) differs...
1
by: hakan.thornqvist | last post by:
I am using GZipStream for compression, and the size and contents of the compressed byte array differs from time to time, using the same source. byte uncompressed =...
3
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working,...
5
by: ismailc | last post by:
Good day, I have button with no width specified. The text value of the button differs, so i left it with no width. It automatically sets the width but the problem is it to wide with about 5...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.