mirror of
https://github.com/friendica/friendica
synced 2024-12-22 23:20:16 +00:00
set user-agent
This commit is contained in:
parent
9534e335aa
commit
ccb00d6882
1 changed files with 2 additions and 1 deletions
3
boot.php
3
boot.php
|
@ -673,7 +673,7 @@ function fetch_url($url,$binary = false, &$redirects = 0) {
|
|||
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
|
||||
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Friendika");
|
||||
|
||||
$curl_time = intval(get_config('system','curl_timeout'));
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
|
||||
|
@ -749,6 +749,7 @@ function post_url($url,$params, $headers = null, &$redirects = 0) {
|
|||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
|
||||
curl_setopt($ch, CURLOPT_POST,1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Friendika");
|
||||
|
||||
$curl_time = intval(get_config('system','curl_timeout'));
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
|
||||
|
|
Loading…
Reference in a new issue