]> git.mxchange.org Git - friendica.git/commitdiff
set user-agent
authorFriendika <info@friendika.com>
Sat, 2 Jul 2011 02:29:56 +0000 (19:29 -0700)
committerFriendika <info@friendika.com>
Sat, 2 Jul 2011 02:29:56 +0000 (19:29 -0700)
boot.php

index 120fb466079a74e459f71cb2355574181741193f..b9b8871d497415a8b8b24a5e32af7a3ed628eeba 100644 (file)
--- a/boot.php
+++ b/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));