Initial commit: Struktur aplikasi ilycats
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
class WhatsappHelper
|
||||
{
|
||||
public static function send($target, $message)
|
||||
{
|
||||
$token = "YOUR_API_TOKEN";
|
||||
$curl = curl_init();
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => 'https://api.fonnte.com/send',
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => ['target' => $target, 'message' => $message],
|
||||
CURLOPT_HTTPHEADER => ["Authorization: $token"],
|
||||
]);
|
||||
curl_exec($curl);
|
||||
curl_close($curl);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user