@Kiusau wrote:
What is the proper way to download a Matomo widget with cURL? The following code succeeds in obtaining what appears to be the widget’s HTML, but all of the CSS, javascript functionality, and imagery are lost.
$url = 'https://www.nudge.online ... matomo/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=Live&actionToWidgetize=widget&idSite=1&period=day&date=today&disableLink=1&token_auth=...'; $curl_request = curl_init(); curl_setopt($curl_request, CURLOPT_URL, $url); curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, 0); if(curl_exec($curl_request) === false) { echo 'Curl error: ' . curl_error($curl_request); } else { echo 'Operation completed without any errors'; }
Roddy
Posts: 1
Participants: 1