mirror of
https://github.com/friendica/friendica
synced 2025-04-23 09:10:10 +00:00
Move "getUserAgent()" to "HTTPRequest" class
This commit is contained in:
parent
cebdcb6599
commit
57587efe58
4 changed files with 26 additions and 27 deletions
|
@ -350,7 +350,7 @@ class Network
|
|||
curl_setopt($ch, CURLOPT_NOBODY, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, $a->getUserAgent());
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, DI::httpRequest()->getUserAgent());
|
||||
|
||||
curl_exec($ch);
|
||||
$curl_info = @curl_getinfo($ch);
|
||||
|
@ -394,7 +394,7 @@ class Network
|
|||
curl_setopt($ch, CURLOPT_NOBODY, 0);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, $a->getUserAgent());
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, DI::httpRequest()->getUserAgent());
|
||||
|
||||
$body = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue