--- Comment #3 from Erel Segal <> 2010-02-22 20:49:14 UTC ---
Thank you, it works only servers where ini_set is enabled.

I found a solution that works on all servers, including shared hosting, where
ini_set is usually disabled:

function get_url_with_agent($url) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_HTTPGET, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Erel Bot');
    $result = curl_exec($ch);
    return $result;

Hope it helps someone.

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to