Questions tagged [get-headers]
90 questions
0
votes
1 answer
PHP get_headers and curl both give empty result
I know there is some similar topic, but not the same. I have a working code, tested with a lot of different url - http and https as well - without any problem. Then, I found a website ... when I asking the URL header, I got empty array…

Bunny.hu
- 3
- 3
0
votes
1 answer
Adding WordPress header and footer to a PHP script
I am trying to create a custom form in WordPress. Step 1 of the form is HTML code that collects data and sends it to a PHP file through the post method, then writes it to the MySQL database and creates Step 2 of the form using PHP code. My problem…

Stephen Rose
- 1
- 1
- 3
0
votes
0 answers
get header and file get coontient to curl
Hi I'd like to transform this small code into curl. Is this possible?

Ayoub Bsl
- 159
- 2
- 6
- 14
0
votes
0 answers
Check if an external url is working PHP or JS
I have a php numeric array that includes 1000+ external links. Can you please help me figure out a PHP or JS function that will loop through every link and check if it's working or not? To create an array and include links that are no longer…

Beqa
- 101
- 2
- 14
0
votes
0 answers
WP - PHP cURL or get_headers() function leads to the 404 error
1) I am using wordpress engine.
2) I have an numeric array() with 800+ links in it, like this.
What I'm trying to do is to run foreach() function and check if link still exist (not returning 404 error).
I tried 2 functions:
1)

Beqa
- 101
- 2
- 14
0
votes
1 answer
Fatal error: Call to undefined function get_header() in /home/theun3wr/public_html/author.php on line 11
Since I shifted to multi-domain hosting in December, I'm plagued with errors on my website. There have been so many issues that I've lost track of them. And every day I end up with a shocking new error that I'm clueless about.
One of the most recent…

The UnbiasedBlog
- 3
- 4
0
votes
1 answer
PHP get_headers recursively
I'm trying to implement a header response to follow recursevely headers redirects. I've implemented the following which works correctly for the first request, but if a location redirect is found in the header, the get_headers do not return any…

neting.it
- 35
- 1
- 5
0
votes
0 answers
How to skip unresponding url from list of urls in php
I have list of urls in excel xheet. i am reading all urls from excel sheet and existing urls and non existing urls are storing in serapare text files.
My problem is if url is not responding then loop is stopped. my aim is to ship that url and check…
user3069471
0
votes
1 answer
PHP get_headers() - Will 300+ requests affect target server load?
As part of automating a web-shop, will 300+ get_headers(); requests affect the target servers?
I realize I only request the headers without the content, but it's still an HTTP request.
To quickly break the code down; 300+ urls are sequentially…

Matthijs
- 51
- 6
0
votes
1 answer
php get_headers returns nothing while page exists
I've a big problem. The following code does not return the header, but the page exists:
$withWarning = get_headers("http://www.test.de",1);
print_r($withWarning);
but this works:
$withWarning = get_headers("https://www.test.de",1);
//…

HansN
- 9
- 3
0
votes
1 answer
What is the most efficient way to text URLs for 404 errors
I'm interested to learn what is the best / leanest way to test URLs for server response codes such as 404s.
I am currently using something very similar to what can be found in the comments of the php manual for get_headers:

feelsickened
- 57
- 2
- 10
0
votes
0 answers
PHP: get_headers doesn't recognize url variable as input, but does if I use a static string
I've been killing myself the last few days trying to figure out why get_headers suddenly stopped working. I checked my INI file, I tried cUrl, I did everything I could see and finally realized that something must be mysteriously wrong with the…

not_a_generic_user
- 1,906
- 2
- 19
- 34
0
votes
0 answers
getting error 404 on a valid url with get_headers and get_meta_tags
could someone explain me why with a valid url and visible in browser I get HTTP request failed! HTTP/1.1 404 Not Found with get_headers and get_meta_tags?
the url that I'm trying to access…

Néstor
- 570
- 2
- 8
- 22
0
votes
4 answers
Android Code to Get HTTP Header Info of a Web Sites
i am developing an android app wherein i need to GET HTTP headers of a website over my android activity, below cited link where i found a code but not getting all the headers.
http://www.mkyong.com/java/how-to-get-http-response-header-in-java/
i…

ChitranjanThakur
- 91
- 3
- 11
0
votes
1 answer
Moodle fatal error call to undefined method get_header
I am using moodle for the first time today. I am to look at a site that was built with it. I was getting a blank white screen after login. Then I googled and put a debug line and now it says an error
Fatal error: Call to undefined method…

RookieAppler
- 1,517
- 5
- 22
- 58