Add user-agent. GoToSocial requires it
rodzic
cd4755d9cd
commit
a04d81e4f7
|
@ -317,8 +317,9 @@
|
|||
$headers = generate_signed_headers( null, $follower_host, $follower_path, "GET" );
|
||||
|
||||
// Set cURL options
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch, CURLOPT_USERAGENT, "activitypub-single-php-file/0.0" );
|
||||
|
||||
// Execute the cURL session
|
||||
$inbox_actor_json = curl_exec( $ch );
|
||||
|
@ -1028,6 +1029,7 @@ HTML;
|
|||
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
|
||||
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode( $message ) );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch, CURLOPT_USERAGENT, "activitypub-single-php-file/0.0" );
|
||||
curl_exec( $ch );
|
||||
|
||||
// Check for errors
|
||||
|
@ -1089,6 +1091,7 @@ HTML;
|
|||
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "POST" );
|
||||
curl_setopt( $ch, CURLOPT_POSTFIELDS, json_encode($message) );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch, CURLOPT_USERAGENT, "activitypub-single-php-file/0.0" );
|
||||
|
||||
// Add the handle to the multi-handle
|
||||
curl_multi_add_handle( $mh, $ch );
|
||||
|
@ -1223,8 +1226,9 @@ HTML;
|
|||
|
||||
// Set cURL options
|
||||
$ch = curl_init( $url );
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch, CURLOPT_USERAGENT, "activitypub-single-php-file/0.0" );
|
||||
|
||||
// Execute the cURL session
|
||||
$urlJSON = curl_exec( $ch );
|
||||
|
|
Ładowanie…
Reference in New Issue