( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/pexelsAPI.php
<?php
 $curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://api.pexels.com/v1/search?query=dog&per_page=1&color=green",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: SnJeKdzoLJiTT1Ge8rud21n5uvhWZPBTT0I9AwBtNSyG1pQLAJA5sRqh"
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
/*$data = json_decode($response , true);
 $pic = $data["photos"][0]["src"]["large"];
 $filename =  strtolower(preg_replace('/[^A-Za-z0-9-]+/', '-', $data["photos"][0]["alt"])).".jpg";
$destinationFilePath = "/var/www/html/v/uploads/gthumbs/$filename";
$image_data = file_get_contents($pic);
file_put_contents($destinationFilePath, $image_data);
echo $urle = "https://www.thebrand.ai/v/uploads/gthumbs/$filename";*/
?>