I'm having an issue with Laravel and Guzzle. When ever I try this line of code with my external website 'violapractice.com' I get an error:
$res = $client->request('GET','http://violapractice.com/articles.json.php');
Client error: `GET http://violapractice.com/articles.json.php` resulted in a `406 Not Acceptable` response: <html><head><title>Error 406 - Not Acceptable</title><head><body><h1>Error 406 - Not Acceptable</h1><p>Generally a 406 e (truncated...)
I've tried requesting a none php file and get the same error:
$res = $client->request('GET','http://violapractice.com/test.html');
The odd thing is, if I use any other URL, like https://stackoverflow.com the GET request goes through with no issue.
Also, I tired using postman on http://violapractice.com/articles.json.php and it worked fine.
I've never experienced anything like this before. Ideas anyone?
$client->setUserAgent('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0');and got this:cURL error 6: Could not resolve host: Mozilla (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)