(string) ($row['company_name'] ?? ''), 'website' => (string) ($row['company_website'] ?? ''), 'city' => (string) ($row['company_city'] ?? ''), 'state' => (string) ($row['company_state'] ?? ''), 'country' => (string) ($row['company_country'] ?? ''), 'currency' => (string) ($row['company_currency'] ?? ''), ]; } /* * Tell the ITFlow project about this install, once - when asked to. Best * effort: an install that can't reach it still finishes, after 10 seconds at * most. True when the project answered. */ function setupShareTelemetry($mysqli, $installation_id, $comments) { mysqli_query($mysqli, "UPDATE settings SET config_telemetry = 2"); $context = stream_context_create(['http' => [ 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => http_build_query(['installation_id' => (string) $installation_id] + setupTelemetryDetails($mysqli) + ['comments' => (string) $comments, 'collection_method' => 1]), 'timeout' => 10, ]]); return @file_get_contents('https://telemetry.itflow.org', false, $context) !== false; }