Issue with fetching all the headers [duplicate]
up vote
0
down vote
favorite
This question already has an answer here:
PHP get headers does not work with -
1 answer
relative url not working for getheaders
1 answer
I have the following issues when trying to get the header using the get_headers() function.
I get the following Warning: get_headers(): This function may only be used against URLs
for both code snippets below.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And this one just loops forever
get_headers("http://localhost/site/index2.php");
I was wondering how can I fix this problem or is there another way I can get the headers if so how and thanks.
php http-headers
marked as duplicate by mario
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 11 at 10:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
This question already has an answer here:
PHP get headers does not work with -
1 answer
relative url not working for getheaders
1 answer
I have the following issues when trying to get the header using the get_headers() function.
I get the following Warning: get_headers(): This function may only be used against URLs
for both code snippets below.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And this one just loops forever
get_headers("http://localhost/site/index2.php");
I was wondering how can I fix this problem or is there another way I can get the headers if so how and thanks.
php http-headers
marked as duplicate by mario
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 11 at 10:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
PHP get headers does not work with -
1 answer
relative url not working for getheaders
1 answer
I have the following issues when trying to get the header using the get_headers() function.
I get the following Warning: get_headers(): This function may only be used against URLs
for both code snippets below.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And this one just loops forever
get_headers("http://localhost/site/index2.php");
I was wondering how can I fix this problem or is there another way I can get the headers if so how and thanks.
php http-headers
This question already has an answer here:
PHP get headers does not work with -
1 answer
relative url not working for getheaders
1 answer
I have the following issues when trying to get the header using the get_headers() function.
I get the following Warning: get_headers(): This function may only be used against URLs
for both code snippets below.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And this one just loops forever
get_headers("http://localhost/site/index2.php");
I was wondering how can I fix this problem or is there another way I can get the headers if so how and thanks.
This question already has an answer here:
PHP get headers does not work with -
1 answer
relative url not working for getheaders
1 answer
php http-headers
php http-headers
asked Nov 11 at 10:06
juice.gin
357
357
marked as duplicate by mario
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 11 at 10:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by mario
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 11 at 10:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
These lines gives you errors because you have to put urls in get_headers
function not file paths.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And below line loops because most probably you're visiting the same url you are giving to get_headers
.
get_headers("http://localhost/site/index2.php");
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
1
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. inhttp://localhost/index.php
and you're visiting that url to see the result, you're given url toget_headers
must be something else thanhttp://localhost/index.php
. In this case there should be no problem.
– AmirhosseinDZ
Nov 11 at 10:34
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
These lines gives you errors because you have to put urls in get_headers
function not file paths.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And below line loops because most probably you're visiting the same url you are giving to get_headers
.
get_headers("http://localhost/site/index2.php");
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
1
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. inhttp://localhost/index.php
and you're visiting that url to see the result, you're given url toget_headers
must be something else thanhttp://localhost/index.php
. In this case there should be no problem.
– AmirhosseinDZ
Nov 11 at 10:34
add a comment |
up vote
2
down vote
These lines gives you errors because you have to put urls in get_headers
function not file paths.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And below line loops because most probably you're visiting the same url you are giving to get_headers
.
get_headers("http://localhost/site/index2.php");
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
1
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. inhttp://localhost/index.php
and you're visiting that url to see the result, you're given url toget_headers
must be something else thanhttp://localhost/index.php
. In this case there should be no problem.
– AmirhosseinDZ
Nov 11 at 10:34
add a comment |
up vote
2
down vote
up vote
2
down vote
These lines gives you errors because you have to put urls in get_headers
function not file paths.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And below line loops because most probably you're visiting the same url you are giving to get_headers
.
get_headers("http://localhost/site/index2.php");
These lines gives you errors because you have to put urls in get_headers
function not file paths.
get_headers("file:///C:/wamp64/www/site/index2.php");
get_headers("C:/wamp64/www/site/index2.php");
And below line loops because most probably you're visiting the same url you are giving to get_headers
.
get_headers("http://localhost/site/index2.php");
answered Nov 11 at 10:18
AmirhosseinDZ
30118
30118
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
1
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. inhttp://localhost/index.php
and you're visiting that url to see the result, you're given url toget_headers
must be something else thanhttp://localhost/index.php
. In this case there should be no problem.
– AmirhosseinDZ
Nov 11 at 10:34
add a comment |
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
1
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. inhttp://localhost/index.php
and you're visiting that url to see the result, you're given url toget_headers
must be something else thanhttp://localhost/index.php
. In this case there should be no problem.
– AmirhosseinDZ
Nov 11 at 10:34
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
how do I get the files headers?
– juice.gin
Nov 11 at 10:21
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
it will still loop even if I am not visiting the same URL.
– juice.gin
Nov 11 at 10:23
1
1
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. in
http://localhost/index.php
and you're visiting that url to see the result, you're given url to get_headers
must be something else than http://localhost/index.php
. In this case there should be no problem.– AmirhosseinDZ
Nov 11 at 10:34
headers are for urls. so if there is url equivalent of any files you want, you have to put that in the function not its path on server. if you're writing this function e.g. in
http://localhost/index.php
and you're visiting that url to see the result, you're given url to get_headers
must be something else than http://localhost/index.php
. In this case there should be no problem.– AmirhosseinDZ
Nov 11 at 10:34
add a comment |