Skip to content

Commit f939138

Browse files
authored
Merge pull request #8 from qencode-dev/dev-2023-05-25-alex-gcp-fix
Dev 2023 05 25 alex gcp fix
2 parents 0962b43 + 73d8cd4 commit f939138

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/get_metadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Qencode\Classes\Metadata;
99

1010
// Replace this with your API key
11-
$apiKey = 'abcde12345';
11+
$apiKey = '1234567890123';
1212
$video_url = 'https://nyc3.s3.qencode.com/qencode/bbb_30s.mp4';
1313

1414
$q = new QencodeApiClient($apiKey);

src/QencodeApiClient.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ class QencodeApiClient
2222
private $lastResponseRaw;
2323

2424
private $lastResponse;
25-
26-
public $url = 'https://api.qencode.com/';
25+
// fix "POST //v1/access_token HTTP/1.0"
26+
// public $url = 'https://api.qencode.com/';
27+
public $url = 'https://api.qencode.com';
2728
public $version = 'v1';
2829
private $supported_versions = array('v1', 'v1.1');
2930

@@ -175,7 +176,7 @@ private function request($method, $path, array $params = [], $arrays = null)
175176
//echo $params."\n\n";
176177
$curl = curl_init($url);
177178

178-
curl_setopt($curl, CURLOPT_USERPWD, $this->key);
179+
// curl_setopt($curl, CURLOPT_USERPWD, $this->key);
179180
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
180181
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
181182
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

0 commit comments

Comments
 (0)