C
C
chelios2018-04-17 01:13:25
PHP
chelios, 2018-04-17 01:13:25

Why, after transferring a site to another server, loading text with the file function from one site began to often lead to a 400 Bad Request error?

There is a site with this code on one server:

$loremIpsum = array_map("strip_tags", file("http://loripsum.net/api/1/short/headers", FILE_IGNORE_NEW_LINES));

Works without problems.
I moved the site without any changes to another server and often began to give a 400 error. On the first server, everything still works fine.
file( loripsum.net/api/1/short/headers): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request 2

Both servers are ubuntu virtual machines in virtualBox.
What could be the reason?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question