I use the file_get_contents() function in PHP. When the length of the url string is not large, then everything works. But I need to make a request on the API of a single site, in which elements from the url string are sent. And when I try to make a request with a link length of approximately 3 thousand characters, I get an error
Warning: file_get_contents(''): failed to open stream: HTTP request failed! HTTP/1.1 403 I do not understand what the problem is and how to solve it.
The link in urlencode() wrapped, and if you enter it in the browser, the request is processed normally. Maybe you need to change something in ini_set() or somewhere else?