diff --git a/app/Console/Commands/ImportUsersCommand.php b/app/Console/Commands/ImportUsersCommand.php index ce2fa71..0196cd5 100644 --- a/app/Console/Commands/ImportUsersCommand.php +++ b/app/Console/Commands/ImportUsersCommand.php @@ -53,4 +53,4 @@ class ImportUsersCommand extends Command $this->info("Importation terminée."); return 0; } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/APIController.php b/app/Http/Controllers/APIController.php index c3dcd12..5245f8b 100644 --- a/app/Http/Controllers/APIController.php +++ b/app/Http/Controllers/APIController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers; +use Exception; use GuzzleHttp\Client; use GuzzleHttp\HandlerStack; use GuzzleHttp\Subscriber\Oauth\Oauth1; @@ -306,60 +307,85 @@ class APIController extends Controller public function unread($user) { - $stack = $this->Oauth1($user); + try{ + $stack = $this->Oauth1($user); - // Créer le client Guzzle avec le handler stack - $client = new Client([ - 'base_uri' => 'https://api.twitter.com/2/', - 'handler' => $stack, - 'proxy' => [ - 'http' => $user->proxy, - ] - ]); - - - // Effectuer la requête POST avec OAuth et les en-têtes personnalisés - $res = $client->get('badge_count/badge_count.json?supports_ntab_urt=true', [ - 'headers' => $this->twitterHeaders, // Ajouter les en-têtes ici - 'auth' => 'oauth' // Assurez-vous que l'authentification OAuth est incluse - ]); - - - $unred = json_decode($res->getBody()->getContents(), true); - - // L'URL des deux liens - $url = 'https://myx.ovh/accounts/'.$user->id; - - $keyboard = [ - 'inline_keyboard' => [ - [ - ['text' => 'Cliquez ici pour plus d\'infos', 'url' => $url] + // Créer le client Guzzle avec le handler stack + $client = new Client([ + 'base_uri' => 'https://api.twitter.com/2/', + 'handler' => $stack, + 'proxy' => [ + 'http' => $user->proxy, ] - ] - ]; + ]); - // Convertir le tableau de clavier en JSON - $keyboardJson = json_encode($keyboard); - if ($unred['dm_unread_count'] > 0) { + // Effectuer la requête POST avec OAuth et les en-têtes personnalisés + $res = $client->get('badge_count/badge_count.json?supports_ntab_urt=true', [ + 'headers' => $this->twitterHeaders, // Ajouter les en-têtes ici + 'auth' => 'oauth' // Assurez-vous que l'authentification OAuth est incluse + ]); - $text = "Un nouveau message pour le compte ".$user->name; + + $unred = json_decode($res->getBody()->getContents(), true); + + // L'URL des deux liens + $url = 'https://myx.ovh/accounts/'.$user->id; + + $keyboard = [ + 'inline_keyboard' => [ + [ + ['text' => 'Cliquez ici pour plus d\'infos', 'url' => $url] + ] + ] + ]; + + // Convertir le tableau de clavier en JSON + $keyboardJson = json_encode($keyboard); + + if ($unred['dm_unread_count'] > 0) { + + $text = "Un nouveau message pour le compte ".$user->name; + Http::get('https://api.telegram.org/bot6784810105:AAEq3emnkRwdyvCLC-iqdIjVJ2Ke6HwwGjg/sendMessage', [ + 'chat_id' => '1970698501', // Remplacez par votre chat_id + 'text' => $text, + 'reply_markup' => $keyboardJson + ]); + + + }elseif ($unred['ntab_unread_count'] > 1) { + + $text = "Une notification pour le compte ".$user->name; + Http::get('https://api.telegram.org/bot6784810105:AAEq3emnkRwdyvCLC-iqdIjVJ2Ke6HwwGjg/sendMessage', [ + 'chat_id' => '1970698501', // Remplacez par votre chat_id + 'text' => $text, + 'reply_markup' => $keyboardJson + ]); + + } + }catch (Exception $exception){ + $text = "Le compte Twitter " . $user->name . " : " . $exception->getMessage(); + + // L'URL des deux liens + $url = 'https://myx.ovh/accounts/'.$user->id; + + $keyboard = [ + 'inline_keyboard' => [ + [ + ['text' => 'Cliquez ici pour plus d\'infos', 'url' => $url] + ] + ] + ]; + + // Convertir le tableau de clavier en JSON + $keyboardJson = json_encode($keyboard); + + // Envoyer le message avec les deux boutons Http::get('https://api.telegram.org/bot6784810105:AAEq3emnkRwdyvCLC-iqdIjVJ2Ke6HwwGjg/sendMessage', [ 'chat_id' => '1970698501', // Remplacez par votre chat_id 'text' => $text, 'reply_markup' => $keyboardJson ]); - - - }elseif ($unred['ntab_unread_count'] > 0) { - - $text = "Une notification pour le compte ".$user->name; - Http::get('https://api.telegram.org/bot6784810105:AAEq3emnkRwdyvCLC-iqdIjVJ2Ke6HwwGjg/sendMessage', [ - 'chat_id' => '1970698501', // Remplacez par votre chat_id - 'text' => $text, - 'reply_markup' => $keyboardJson - ]); - } } diff --git a/app/Http/Controllers/BotController.php b/app/Http/Controllers/BotController.php index dc07ae2..e8fc657 100644 --- a/app/Http/Controllers/BotController.php +++ b/app/Http/Controllers/BotController.php @@ -2,27 +2,198 @@ namespace App\Http\Controllers; -use App\Http\Controllers\TwitterController; use App\Models\Account; -use App\Models\Block; use App\Models\Concour; use App\Models\Contest; use Carbon\Carbon; use Illuminate\Support\Arr; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Http; -use Laravel\Dusk\Browser; -use Symfony\Component\BrowserKit\HttpBrowser; -use Symfony\Component\HttpClient\HttpClient; -use Illuminate\Http\Request; use Throwable; class BotController extends Controller { - public function test($user,$contest){ + + public function index() + { + + $response = Http::get('https://rtandfollow.com/apibot'); + $tweets = $response->json(); + + $accounts = Account::where('enable', true)->get(); + + foreach($accounts as $account){ + try{ + $user = $account; + $twitter = new TwitterController(); + $browser = $twitter->connexion($user); + $url = $browser->driver->getCurrentURL(); + + if($url == 'https://x.com/account/access'){ + $browser->quit(); + exec('taskkill /f /im chrome.exe'); + }else{ + + shuffle($tweets); + + $a = 1; + + foreach($tweets as $status) { + + $tweetid = $status['tweetid']; + $screen_name = $status['organizer']['screen_name']; + $text = $status['description']; + + $concours = DB::table('concours')->where('tweet_id', $tweetid)->where('user', $user->id)->first(); + $blocking = DB::table('blocks')->where('screen_name', $screen_name)->first(); + + $containsBlacklistedWord = preg_match('/' . implode('|', array_map('preg_quote', config('twitter.giveaway_to_blacklist'), ['/'])) . '/i', $text) === 1; + + //On verifie que le concours n'est pas dans la BDD ou que l'utilisateur n'est pas bloqué + if (empty($concours) and empty($blocking) and $containsBlacklistedWord !== true) { + + //On recherche la date de fin du concours + $fin = $status['fin']; + + if ($fin >= Carbon::now()->format('Y-m-d')) { + + try { + + $tweetspecial = $this->getSpecialComment($text,$tweetid,$screen_name); + + $tweetcomment = $this->getComment($text); + + $tags = $this->getTags($text); + + $hashtags = $this->getHashtags($text); + + $follows = $this->getFollows($text); + + $concours = Concour::create([ + 'description' => $text, + 'tweet_id' => $tweetid, + 'name' => $screen_name, + 'fin' => $fin, + 'user' => $user->id, + ]); + + $twitter->retweet($browser, $tweetid); + + if (isset($tweetspecial) && isset($tags)) { + $retweet = $tweetspecial . ' ' . $tags . ' ' . $hashtags; + $encode = urlencode($retweet); + + //On reply + $twitter->reply($browser, $tweetid, $encode); + + }elseif(isset($tweetcomment) && isset($tags)) { + $comments = config('twitter.sentence_for_tag'); + $comment = Arr::random($comments); + $retweet = $comment . ' ' . $tags . ' ' . $hashtags; + $encode = urlencode($retweet); + + //On reply + $twitter->reply($browser, $tweetid, $encode); + + }elseif(isset($tweetspecial)){ + $retweet = $tweetspecial . ' ' . $hashtags; + $encode = urlencode($retweet); + + //On reply + $twitter->reply($browser, $tweetid, $encode); + + }elseif(isset($tweetcomment)){ + $comments = config('twitter.sentence_for_random_comment'); + $comment = Arr::random($comments); + $retweet = $comment . ' ' . $hashtags; + $encode = urlencode($retweet); + + //On reply + $twitter->reply($browser, $tweetid, $encode); + + }elseif(isset($tags)){ + $retweet = $tags; + $encode = urlencode($retweet); + + //On reply + $twitter->reply($browser, $tweetid, $encode); + } + + //On follow le créateur + $twitter->follow($browser, $screen_name); + + if(isset($follows)){ + foreach ($follows as $follow){ + $twitter->follow($browser, $follow); + } + } + + //On like si besoin + preg_match("/LIKE/i", $text, $like); + if (isset($like[0])) { + $twitter->like($browser, $tweetid); + } + + $yes = rand(0,2); + + if($yes == 1){ + + $new = $this->combinefeeds()[0]; + $title = (strlen($new['title']) > 205) ? substr($new['title'],0,205).'...' : $new['title']; + //$url = $this->urlshort($new['url']); + $short = $title.' '.$new['url']; + $short = urlencode($short); + //On tweet une info + $twitter->tweet($browser, $short); + + } + + $a++; + + if ($a > 2) { + echo $user->name.' a bien participé; '; + + break; + } + + } catch (Throwable $e) { + + report($e); + + $a++; + + if ($a > 2) { + break; + } + } + } + } + } + + if (isset($browser) && $browser instanceof Browser) { + // Récupérez les cookies de la session actuelle + $cookies = $browser->driver->manage()->getCookies(); + + // Sauvegardez les cookies dans un fichier au format JSON + $user->cookies = serialize($cookies); + $user->save(); + + $browser->quit(); + } + } + }catch (Throwable $e) { + report($e); + } + } + + exec('taskkill /f /im chrome.exe'); + + } + + public function process($user,$id){ $user = Account::find($user); - $contest = Contest::findOrFail($contest); + $contest = Contest::findOrFail($id); $text = $contest->description; @@ -77,14 +248,7 @@ class BotController extends Controller // Récupérer la phrase avec le comptage le plus élevé $phrasePlusFrequente = ($indexPhrasePlusFrequente !== null) ? $texts[$indexPhrasePlusFrequente] : null; - if ($phrasePlusFrequente != null) { - // Supprimer les hashtags - $phrasePlusFrequente = preg_replace('/#\w+\s?/', '', $phrasePlusFrequente); - - // Supprimer les tags - $phrasePlusFrequente = preg_replace('/@\w+\s?/', '', $phrasePlusFrequente); - // Supprimer les emojis $phrasePlusFrequente = $this->remove_emojis($phrasePlusFrequente); @@ -189,6 +353,18 @@ class BotController extends Controller return $dotProduct / ($magnitude1 * $magnitude2); } + private function getFollows(mixed $text) + { + preg_match_all("/\s@([\w_-]+)/", $text, $mentions); + + if(isset($mentions[1])){ + $mentions = array_unique($mentions[1]); + return $mentions; + + }else{ + return ''; + } + } private function remove_emojis($string) { // Match all emojis (including extended ones) @@ -198,4 +374,6 @@ class BotController extends Controller return $clear_string; } -} \ No newline at end of file + + +} diff --git a/app/Http/Controllers/ContestController.php b/app/Http/Controllers/ContestController.php index 5f87e5e..2b22f34 100644 --- a/app/Http/Controllers/ContestController.php +++ b/app/Http/Controllers/ContestController.php @@ -8,6 +8,7 @@ use Artesaos\SEOTools\Facades\SEOTools; use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Facades\Http; +use LanguageDetector\LanguageDetector; use Symfony\Component\BrowserKit\HttpBrowser; use Symfony\Component\HttpClient\HttpClient; @@ -29,7 +30,7 @@ class ContestController extends Controller $i = 1; - while ($i < 10){ + while ($i < 25){ $results = $crawler->filterXPath('//div[@class="timeline-item "]')->each(function ($node) { $id = ($node->filterXPath('//*[@class="tweet-link"]'))->attr('href'); $created_at = ($node->filterXPath('//span[@class="tweet-date"]/a'))->attr('title'); @@ -61,7 +62,14 @@ class ContestController extends Controller $fake = Block::where('screen_name', $screen)->first(); $containsBlacklistedWord = preg_match('/' . implode('|', array_map('preg_quote', config('twitter.giveaway_to_blacklist'), ['/'])) . '/i', $text) === 1; - if(!$contest && !$fake && $nbretweet > 100 && $containsBlacklistedWord !== true) { + $language = new LanguageDetector(); + $lang = $language->evaluate($text); + + $created_at = str_replace(' · ', ' ', $created_at); + $created_at = Carbon::parse($created_at)->format('Y-m-d H:i:s'); + $nowMinusOneMonth = Carbon::now()->subMonth(); + + if(!$contest && !$fake && $nbretweet > 100 && $containsBlacklistedWord !== true && $lang == 'fr' && $created_at >= $nowMinusOneMonth){ $regex_detect_rts = [ "/\bRT\b/", @@ -101,6 +109,7 @@ class ContestController extends Controller 'nbretweet' => $nbretweet, 'nblike' => $nblike, 'nbreply' => $nbreply, + 'created_at' => $created_at, ]); } @@ -125,33 +134,14 @@ class ContestController extends Controller public function searchcontest() { $search = [ - 'giveaway', '#concours', - 'concours like', - 'concours rt', - 'concours follow', '#JeuConcours', 'JeuConcours', 'jeu concours', - 'offre follow gagnant', 'concours pour gagner', - 'gagner rt', - 'Gagnez rt follow', - 'RT follow', 'concours rt like', 'concours rt fav', - 'RT tweet Follow', - 'concours rt follow', - 'rt follow tas', - 'rt follow tirage au sort', - 'rt follow gagner', - 'rt follow commente', - 'rt suivre concours', - 'rt suivez concours', - 'rt suivre tirage au sort', - 'rt suivre tas', 'concours remporter', - 'remporter rt', 'concours tas le', 'concours résultats le rt', 'tirage au sort concours', @@ -208,7 +198,14 @@ class ContestController extends Controller $fake = Block::where('screen_name', $screen)->first(); $containsBlacklistedWord = preg_match('/' . implode('|', array_map('preg_quote', config('twitter.giveaway_to_blacklist'), ['/'])) . '/i', $text) === 1; - if (!$contest && !$fake && $nbretweet > 1000 && $containsBlacklistedWord !== true) { + $language = new LanguageDetector(); + $lang = $language->evaluate($text); + + $created_at = str_replace(' · ', ' ', $created_at); + $created_at = Carbon::parse($created_at)->format('Y-m-d H:i:s'); + $nowMinusOneMonth = Carbon::now()->subMonth(); + + if (!$contest && !$fake && $nbretweet > 500 && $containsBlacklistedWord !== true && $lang == 'fr' && $created_at >= $nowMinusOneMonth) { $regex_detect_rts = [ @@ -252,6 +249,7 @@ class ContestController extends Controller 'nbretweet' => $nbretweet, 'nblike' => $nblike, 'nbreply' => $nbreply, + 'created_at' => $created_at, ]); } @@ -438,72 +436,72 @@ class ContestController extends Controller } private function getDate($string) { - // Pattern pour détecter les dates au format JJ/MM ou JJ.MM - $pattern_jjmm = '/\b(\d{1,2})(\/|\.)\d{1,2}\b/'; + // Pattern pour détecter les dates au format JJ/MM ou JJ.MM + $pattern_jjmm = '/\b(\d{1,2})(\/|\.)\d{1,2}\b/'; - // Pattern pour détecter les dates du style "1 août" (ou autre mois en français) - $mois_fr = array( - 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', - 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre' - ); - $pattern_jj_mois_fr = '/\b(\d{1,2}) (' . implode('|', $mois_fr) . ')\b/i'; + // Pattern pour détecter les dates du style "1 août" (ou autre mois en français) + $mois_fr = array( + 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', + 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre' + ); + $pattern_jj_mois_fr = '/\b(\d{1,2}) (' . implode('|', $mois_fr) . ')\b/i'; - // Stocker les correspondances dans un tableau - $correspondances = []; + // Stocker les correspondances dans un tableau + $correspondances = []; - // Chercher les dates au format JJ/MM ou JJ.MM - if (preg_match_all($pattern_jjmm, $string, $matches)) { - $correspondances = array_merge($correspondances, $matches[0]); - } - - // Chercher les dates du style "1 août" (ou autre mois en français) - if (preg_match_all($pattern_jj_mois_fr, $string, $matches)) { - // Convertir le mois en format numérique (1 pour janvier, 2 pour février, etc.) - $mois_numerique = array_flip($mois_fr); - foreach ($matches[2] as $index => $mois) { - $matches[0][$index] = $matches[1][$index] . '/' . str_pad($mois_numerique[strtolower($mois)] + 1, 2, '0', STR_PAD_LEFT); + // Chercher les dates au format JJ/MM ou JJ.MM + if (preg_match_all($pattern_jjmm, $string, $matches)) { + $correspondances = array_merge($correspondances, $matches[0]); } - $correspondances = array_merge($correspondances, $matches[0]); + + // Chercher les dates du style "1 août" (ou autre mois en français) + if (preg_match_all($pattern_jj_mois_fr, $string, $matches)) { + // Convertir le mois en format numérique (1 pour janvier, 2 pour février, etc.) + $mois_numerique = array_flip($mois_fr); + foreach ($matches[2] as $index => $mois) { + $matches[0][$index] = $matches[1][$index] . '/' . str_pad($mois_numerique[strtolower($mois)] + 1, 2, '0', STR_PAD_LEFT); + } + $correspondances = array_merge($correspondances, $matches[0]); + } + + // Vérifier s'il y a des dates détectées + if (empty($correspondances)) { + return ""; // Retourne une chaîne vide si aucune date n'est trouvée + } + + // Si plusieurs dates sont trouvées, trier les dates et récupérer la dernière + usort($correspondances, function ($a, $b) { + $dateA = strtotime($a); + $dateB = strtotime($b); + return $dateB - $dateA; // Tri décroissant + }); + + // Récupérer la dernière date détectée après le tri + $derniere_date = $correspondances[0]; + + // Convertir la dernière date au format "Y-m-d" (année-mois-jour) + if (strpos($derniere_date, '/') !== false) { + // Format JJ/MM + list($jour, $mois) = explode('/', $derniere_date); + $annee = date('Y'); + } elseif (strpos($derniere_date, '.') !== false) { + // Format JJ.MM + list($jour, $mois) = explode('.', $derniere_date); + $annee = date('Y'); + } else { + return ""; // Cas inattendu (ne devrait pas se produire) + } + + // Convertir en date avec gestion des erreurs (ex. : février 30) + try { + $date_convertie = date('Y-m-d', strtotime("$annee-$mois-$jour")); + } catch (Exception $e) { + return ""; // Retourne une chaîne vide si la conversion échoue + } + + return $date_convertie; } - // Vérifier s'il y a des dates détectées - if (empty($correspondances)) { - return ""; // Retourne une chaîne vide si aucune date n'est trouvée - } - - // Si plusieurs dates sont trouvées, trier les dates et récupérer la dernière - usort($correspondances, function ($a, $b) { - $dateA = strtotime($a); - $dateB = strtotime($b); - return $dateB - $dateA; // Tri décroissant - }); - - // Récupérer la dernière date détectée après le tri - $derniere_date = $correspondances[0]; - - // Convertir la dernière date au format "Y-m-d" (année-mois-jour) - if (strpos($derniere_date, '/') !== false) { - // Format JJ/MM - list($jour, $mois) = explode('/', $derniere_date); - $annee = date('Y'); - } elseif (strpos($derniere_date, '.') !== false) { - // Format JJ.MM - list($jour, $mois) = explode('.', $derniere_date); - $annee = date('Y'); - } else { - return ""; // Cas inattendu (ne devrait pas se produire) - } - - // Convertir en date avec gestion des erreurs (ex. : février 30) - try { - $date_convertie = date('Y-m-d', strtotime("$annee-$mois-$jour")); - } catch (Exception $e) { - return ""; // Retourne une chaîne vide si la conversion échoue - } - - return $date_convertie; -} - private function getTwitterDate($text) { // Utilisez une expression régulière pour extraire toutes les dates @@ -534,9 +532,9 @@ class ContestController extends Controller } } - public function all() + public function all() { - $contests = Contest::where('fin', '>=', Carbon::now()->format('Y-m-d'))->where('participated', 0)->where('enable', 1)->paginate(20); + $contests = Contest::where('fin', '>=', Carbon::now()->format('Y-m-d'))->where('participated', 0)->where('enable', 1)->orderby('id', 'desc')->paginate(20); $count = Contest::where('fin', '>=', Carbon::now()->format('Y-m-d'))->where('participated', 0)->where('enable', 1)->count(); @@ -544,4 +542,4 @@ class ContestController extends Controller return view('contests', compact('contests', 'count')); } -} \ No newline at end of file +} diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 3dcfdfb..dfd2f7e 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -18,10 +18,10 @@ class HomeController extends Controller public function history() { - $contests = Contest::where('participated', true)->orderby('updated_at', 'desc')->paginate(20); + $contests = Contest::where('participated',true)->orderby('updated_at','desc')->paginate(20); SEOTools::setTitle('Mon historique'); return view('history', compact('contests')); } -} \ No newline at end of file +} diff --git a/app/Jobs/ProcessNews.php b/app/Jobs/ProcessNews.php index 5ee9b2a..2d6ca0e 100644 --- a/app/Jobs/ProcessNews.php +++ b/app/Jobs/ProcessNews.php @@ -7,6 +7,7 @@ use Illuminate\Foundation\Queue\Queueable; use App\Http\Controllers\APIController; use App\Models\Account; use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Http; class ProcessNews implements ShouldQueue { @@ -49,17 +50,14 @@ class ProcessNews implements ShouldQueue shuffle($news); - $nb = rand(1,3); + $randomKey = array_rand($news); + + $article = $news[$randomKey]; + + $tweetid = $article['conversation_id_str']; + $API->retweet($user, $tweetid); + sleep(15); - if (count($news) >= $nb) { - $selectedArticles = array_slice($news, 0, $nb); - - foreach ($selectedArticles as $article) { - $tweetid = $article['conversation_id_str']; - $API->retweet($user, $tweetid); - sleep(30); - } - } }catch (Exception $exception){ $text = "Le compte Twitter " . $user->name . " : " . $exception->getMessage(); @@ -79,7 +77,7 @@ class ProcessNews implements ShouldQueue // Envoyer le message avec les deux boutons Http::get('https://api.telegram.org/bot6784810105:AAEq3emnkRwdyvCLC-iqdIjVJ2Ke6HwwGjg/sendMessage', [ - 'chat_id' => '1970698501', + 'chat_id' => '1970698501', // Remplacez par votre chat_id 'text' => $text, 'reply_markup' => $keyboardJson ]); diff --git a/app/Jobs/ProcessTweet.php b/app/Jobs/ProcessTweet.php index e3e3d4f..83353e9 100644 --- a/app/Jobs/ProcessTweet.php +++ b/app/Jobs/ProcessTweet.php @@ -16,7 +16,7 @@ class ProcessTweet implements ShouldQueue { use Queueable; - public $timeout = 900; + public $timeout = 300; public $tries = 1; private $id; @@ -212,7 +212,7 @@ class ProcessTweet implements ShouldQueue // Récupérer la phrase avec le comptage le plus élevé $phrasePlusFrequente = ($indexPhrasePlusFrequente !== null) ? $texts[$indexPhrasePlusFrequente] : null; - if ($phrasePlusFrequente != null) { + if ($phrasePlusFrequente != null) { // Supprimer les emojis $phrasePlusFrequente = $this->remove_emojis($phrasePlusFrequente); diff --git a/app/Livewire/Contests.php b/app/Livewire/Contests.php index 97e759a..8231165 100644 --- a/app/Livewire/Contests.php +++ b/app/Livewire/Contests.php @@ -65,10 +65,10 @@ class Contests extends Component public function render() { $datefin = Carbon::now()->addDays(3)->format('Y-m-d'); - $contests = Contest::where('fin', '>=', now()) + $contests = Contest::where('fin', '>=', Carbon::now()->format('Y-m-d')) ->where('fin', '<=', $datefin) ->where('participated', '!=', true) - //->where('enable', true) + ->where('enable', true) ->orderBy('fin', 'asc') ->paginate(20); diff --git a/app/Nova/Actions/AutoLogin.php b/app/Nova/Actions/AutoLogin.php index 90f32c3..0561955 100644 --- a/app/Nova/Actions/AutoLogin.php +++ b/app/Nova/Actions/AutoLogin.php @@ -28,7 +28,7 @@ class AutoLogin extends Action { $Browser = new BrowserDetection(); $useragent = $_SERVER['HTTP_USER_AGENT']; - + if (str_contains($Browser->getOS($useragent)['os_family'], 'android')) { // Générer un lien spécifique pour Kiwi $kiwiLink = 'intent://x.com?auth_token='.$models->first()->auth_token.'#Intent;package=com.kiwibrowser.browser;scheme=https;end'; diff --git a/app/Nova/Actions/Webmail.php b/app/Nova/Actions/Webmail.php index ce5d16f..1141a27 100644 --- a/app/Nova/Actions/Webmail.php +++ b/app/Nova/Actions/Webmail.php @@ -41,4 +41,4 @@ class Webmail extends Action { return []; } -} \ No newline at end of file +} diff --git a/app/Nova/Contest.php b/app/Nova/Contest.php index aa74d45..b32b888 100644 --- a/app/Nova/Contest.php +++ b/app/Nova/Contest.php @@ -67,7 +67,7 @@ class Contest extends Resource }) ->disableDownload(), URL::make('URL')->readonly(), - Date::make('Fin')->readonly()->sortable(), + Date::make('Fin')->sortable(), Text::make('Tweet ID', 'tweetid')->hideFromIndex()->readonly(), Text::make('Nb Tweet', 'nbtweet')->readonly(), ]; diff --git a/composer.json b/composer.json index 24edd96..b928a6f 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,9 @@ "artesaos/seotools": "^1.3", "foroco/php-browser-detection": "^2.8", "guzzlehttp/oauth-subscriber": "^0.6.0", + "hisorange/browser-detect": "^5.0", "kamona/fortify-bootstrap": "^1.0", + "landrok/language-detector": "^1.4", "larabug/larabug": "^3.1", "laravel/framework": "^11.27.2", "laravel/nova": "*", diff --git a/composer.lock b/composer.lock index ff2b594..a0e6b10 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5e9aafb897b7898c9c493bb7db309e88", + "content-hash": "f8a60e19609ebe74140d004efea5e6dc", "packages": [ { "name": "artesaos/seotools", @@ -319,6 +319,82 @@ ], "time": "2024-02-09T16:56:22+00:00" }, + { + "name": "composer/ca-bundle", + "version": "1.5.3", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/3b1fc3f0be055baa7c6258b1467849c3e8204eb2", + "reference": "3b1fc3f0be055baa7c6258b1467849c3e8204eb2", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^8 || ^9", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/process": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.5.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-11-04T10:15:26+00:00" + }, { "name": "dasprid/enum", "version": "1.0.6", @@ -1553,6 +1629,78 @@ ], "time": "2023-12-03T19:50:20+00:00" }, + { + "name": "hisorange/browser-detect", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/hisorange/browser-detect.git", + "reference": "6460325a81460d912131c0b943a00e76f8847cdb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hisorange/browser-detect/zipball/6460325a81460d912131c0b943a00e76f8847cdb", + "reference": "6460325a81460d912131c0b943a00e76f8847cdb", + "shasum": "" + }, + "require": { + "jaybizzle/crawler-detect": "~1.2", + "league/pipeline": "^1.0", + "matomo/device-detector": "^6.0", + "mobiledetect/mobiledetectlib": "~4.0", + "php": "^8.1", + "ua-parser/uap-php": "~3.9" + }, + "require-dev": { + "orchestra/testbench": "~7.0 || ~8.0", + "php-coveralls/php-coveralls": "~2.0", + "phpunit/phpunit": "~9.0 || ~10.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "hisorange\\BrowserDetect\\ServiceProvider" + ], + "aliases": { + "Browser": "hisorange\\BrowserDetect\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "hisorange\\BrowserDetect\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Varga Zsolt", + "email": "hello@hisorange.me" + } + ], + "description": "Browser & Mobile detection package for Laravel.", + "homepage": "https://github.com/hisorange/browser-detect", + "keywords": [ + "analyse", + "browser", + "detect", + "hisorange", + "laravel", + "mobile", + "tablet", + "user agent", + "user-agent" + ], + "support": { + "issues": "https://github.com/hisorange/browser-detect/issues", + "source": "https://github.com/hisorange/browser-detect/tree/5.0.3" + }, + "time": "2024-02-05T08:21:06+00:00" + }, { "name": "inertiajs/inertia-laravel", "version": "v1.3.0", @@ -1629,6 +1777,58 @@ ], "time": "2024-06-13T01:25:09+00:00" }, + { + "name": "jaybizzle/crawler-detect", + "version": "v1.2.121", + "source": { + "type": "git", + "url": "https://github.com/JayBizzle/Crawler-Detect.git", + "reference": "40ecda6322d4163fe2c6e1dd47c574f580b8487f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/40ecda6322d4163fe2c6e1dd47c574f580b8487f", + "reference": "40ecda6322d4163fe2c6e1dd47c574f580b8487f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.5|^6.5|^9.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Jaybizzle\\CrawlerDetect\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Beech", + "email": "m@rkbee.ch", + "role": "Developer" + } + ], + "description": "CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent", + "homepage": "https://github.com/JayBizzle/Crawler-Detect/", + "keywords": [ + "crawler", + "crawler detect", + "crawler detector", + "crawlerdetect", + "php crawler detect" + ], + "support": { + "issues": "https://github.com/JayBizzle/Crawler-Detect/issues", + "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.121" + }, + "time": "2024-10-20T21:42:39+00:00" + }, { "name": "kamona/fortify-bootstrap", "version": "v1.0.3", @@ -1684,6 +1884,51 @@ }, "time": "2022-03-04T11:41:48+00:00" }, + { + "name": "landrok/language-detector", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/landrok/language-detector.git", + "reference": "91511a4f93700bd1c4c576b0e3b42173334a3cab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/landrok/language-detector/zipball/91511a4f93700bd1c4c576b0e3b42173334a3cab", + "reference": "91511a4f93700bd1c4c576b0e3b42173334a3cab", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=7.4", + "webmozart/assert": "^1.2" + }, + "require-dev": { + "phpunit/phpunit": ">=6" + }, + "type": "library", + "autoload": { + "psr-4": { + "LanguageDetector\\": "src/LanguageDetector/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A fast and reliable PHP library for detecting languages", + "homepage": "https://github.com/landrok/language-detector", + "keywords": [ + "detector", + "language", + "n-grams" + ], + "support": { + "issues": "https://github.com/landrok/language-detector/issues", + "source": "https://github.com/landrok/language-detector/tree/1.4.0" + }, + "time": "2023-12-18T21:52:42+00:00" + }, { "name": "larabug/larabug", "version": "3.1", @@ -2771,6 +3016,63 @@ ], "time": "2024-09-21T08:32:55+00:00" }, + { + "name": "league/pipeline", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/pipeline.git", + "reference": "aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/pipeline/zipball/aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8", + "reference": "aa14b0e3133121f8be39e9a3b6ddd011fc5bb9a8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "leanphp/phpspec-code-coverage": "^4.2", + "phpspec/phpspec": "^4.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net", + "role": "Author" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "role": "Maintainer" + } + ], + "description": "A plug and play pipeline implementation.", + "keywords": [ + "composition", + "design pattern", + "pattern", + "pipeline", + "sequential" + ], + "support": { + "issues": "https://github.com/thephpleague/pipeline/issues", + "source": "https://github.com/thephpleague/pipeline/tree/master" + }, + "time": "2018-06-05T21:06:51+00:00" + }, { "name": "lexicon/nova-action-button-selectors", "version": "v1.2.1", @@ -2969,6 +3271,139 @@ }, "time": "2024-03-31T07:05:07+00:00" }, + { + "name": "matomo/device-detector", + "version": "6.4.1", + "source": { + "type": "git", + "url": "https://github.com/matomo-org/device-detector.git", + "reference": "0d364e0dd6c177da3c24cd4049178026324fd7ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matomo-org/device-detector/zipball/0d364e0dd6c177da3c24cd4049178026324fd7ac", + "reference": "0d364e0dd6c177da3c24cd4049178026324fd7ac", + "shasum": "" + }, + "require": { + "mustangostang/spyc": "*", + "php": "^7.2|^8.0" + }, + "replace": { + "piwik/device-detector": "self.version" + }, + "require-dev": { + "matthiasmullie/scrapbook": "^1.4.7", + "mayflower/mo4-coding-standard": "^v9.0.0", + "phpstan/phpstan": "^1.10.44", + "phpunit/phpunit": "^8.5.8", + "psr/cache": "^1.0.1", + "psr/simple-cache": "^1.0.1", + "symfony/yaml": "^5.1.7" + }, + "suggest": { + "doctrine/cache": "Can directly be used for caching purpose", + "ext-yaml": "Necessary for using the Pecl YAML parser" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeviceDetector\\": "" + }, + "exclude-from-classmap": [ + "Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-or-later" + ], + "authors": [ + { + "name": "The Matomo Team", + "email": "hello@matomo.org", + "homepage": "https://matomo.org/team/" + } + ], + "description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.", + "homepage": "https://matomo.org", + "keywords": [ + "devicedetection", + "parser", + "useragent" + ], + "support": { + "forum": "https://forum.matomo.org/", + "issues": "https://github.com/matomo-org/device-detector/issues", + "source": "https://github.com/matomo-org/matomo", + "wiki": "https://dev.matomo.org/" + }, + "time": "2024-09-24T13:50:04+00:00" + }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "4.8.06", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "af088b54cecc13b3264edca7da93a89ba7aa2d9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/af088b54cecc13b3264edca7da93a89ba7aa2d9e", + "reference": "af088b54cecc13b3264edca7da93a89ba7aa2d9e", + "shasum": "" + }, + "require": { + "php": ">=8.0", + "psr/simple-cache": "^2 || ^3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.35.1", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.6", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Detection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "support": { + "issues": "https://github.com/serbanghita/Mobile-Detect/issues", + "source": "https://github.com/serbanghita/Mobile-Detect/tree/4.8.06" + }, + "funding": [ + { + "url": "https://github.com/serbanghita", + "type": "github" + } + ], + "time": "2024-03-01T22:28:42+00:00" + }, { "name": "monolog/monolog", "version": "3.8.0", @@ -3072,6 +3507,60 @@ ], "time": "2024-11-12T13:57:08+00:00" }, + { + "name": "mustangostang/spyc", + "version": "0.6.3", + "source": { + "type": "git", + "url": "https://github.com/mustangostang/spyc.git", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0", + "reference": "4627c838b16550b666d15aeae1e5289dd5b77da0", + "shasum": "" + }, + "require": { + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "4.3.*@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.x-dev" + } + }, + "autoload": { + "files": [ + "Spyc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "mustangostang", + "email": "vlad.andersen@gmail.com" + } + ], + "description": "A simple YAML loader/dumper class for PHP", + "homepage": "https://github.com/mustangostang/spyc/", + "keywords": [ + "spyc", + "yaml", + "yml" + ], + "support": { + "issues": "https://github.com/mustangostang/spyc/issues", + "source": "https://github.com/mustangostang/spyc/tree/0.6.3" + }, + "time": "2019-09-10T13:16:29+00:00" + }, { "name": "nesbot/carbon", "version": "2.72.5", @@ -7415,6 +7904,69 @@ }, "time": "2023-12-08T13:03:43+00:00" }, + { + "name": "ua-parser/uap-php", + "version": "v3.9.14", + "source": { + "type": "git", + "url": "https://github.com/ua-parser/uap-php.git", + "reference": "b796c5ea5df588e65aeb4e2c6cce3811dec4fed6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ua-parser/uap-php/zipball/b796c5ea5df588e65aeb4e2c6cce3811dec4fed6", + "reference": "b796c5ea5df588e65aeb4e2c6cce3811dec4fed6", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.1", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.33", + "phpunit/phpunit": "^8 || ^9", + "symfony/console": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "symfony/filesystem": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "symfony/finder": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "symfony/yaml": "^3.4 || ^4.2 || ^4.3 || ^5.0", + "vimeo/psalm": "^3.12" + }, + "suggest": { + "symfony/console": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0", + "symfony/filesystem": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0", + "symfony/finder": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0", + "symfony/yaml": "Required for CLI usage - ^3.4 || ^4.3 || ^5.0" + }, + "bin": [ + "bin/uaparser" + ], + "type": "library", + "autoload": { + "psr-4": { + "UAParser\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dave Olsen", + "email": "dmolsen@gmail.com" + }, + { + "name": "Lars Strojny", + "email": "lars@strojny.net" + } + ], + "description": "A multi-language port of Browserscope's user agent parser.", + "support": { + "issues": "https://github.com/ua-parser/uap-php/issues", + "source": "https://github.com/ua-parser/uap-php/tree/v3.9.14" + }, + "time": "2020-10-02T23:36:20+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.1", @@ -10305,12 +10857,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.2" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/config/database.php b/config/database.php index f8e8dcb..3e28686 100644 --- a/config/database.php +++ b/config/database.php @@ -140,7 +140,7 @@ return [ 'redis' => [ - 'client' => env('REDIS_CLIENT', 'phpredis'), + 'client' => env('REDIS_CLIENT', 'predis'), 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), @@ -149,11 +149,11 @@ return [ 'default' => [ 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), + 'host' => env('REDIS_HOST', '/home5/sc1welocker/.cpanel/redis/redis.sock'), 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_DB', '0'), + 'password' => env('REDIS_PASSWORD', '8ddd8380890853b08d88f0ab7ed98ba9'), + 'port' => env('REDIS_PORT', 0), + 'database' => env('REDIS_DB', 0), ], 'cache' => [ diff --git a/config/laravelpwa.php b/config/laravelpwa.php index f468e7e..6856bff 100644 --- a/config/laravelpwa.php +++ b/config/laravelpwa.php @@ -1,78 +1,84 @@ 'MyX', - 'manifest' => [ - 'name' => env('APP_NAME', 'MyX'), - 'short_name' => 'MyX', - 'start_url' => '/', - 'background_color' => '#00b4ff', - 'theme_color' => '#00b4ff', - 'display' => 'standalone', - 'orientation'=> 'any', - 'status_bar'=> '#00b4ff', - 'icons' => [ - '72x72' => [ - 'path' => '/images/icons/icon-72x72.png', - 'purpose' => 'any' - ], - '96x96' => [ - 'path' => '/images/icons/icon-96x96.png', - 'purpose' => 'any' - ], - '128x128' => [ - 'path' => '/images/icons/icon-128x128.png', - 'purpose' => 'any' - ], - '144x144' => [ - 'path' => '/images/icons/icon-144x144.png', - 'purpose' => 'any' - ], - '152x152' => [ - 'path' => '/images/icons/icon-152x152.png', - 'purpose' => 'any' - ], - '192x192' => [ - 'path' => '/images/icons/icon-192x192.png', - 'purpose' => 'any' - ], - '384x384' => [ - 'path' => '/images/icons/icon-384x384.png', - 'purpose' => 'any' - ], - '512x512' => [ - 'path' => '/images/icons/icon-512x512.png', - 'purpose' => 'any' - ], + "name" => "MyX", + "short_name" => "MyX", + "start_url" => "https://myx.ovh/", + "display" => "standalone", + "theme_color" => "#00b4ff", + "background_color" => "#00b4ff", + "orientation" => "any", + "status_bar" => "#00b4ff", + "splash" => [ + "640x1136" => "/images/icons/splash-640x1136.png", + "750x1334" => "/images/icons/splash-750x1334.png", + "828x1792" => "/images/icons/splash-828x1792.png", + "1125x2436" => "/images/icons/splash-1125x2436.png", + "1242x2208" => "/images/icons/splash-1242x2208.png", + "1242x2688" => "/images/icons/splash-1242x2688.png", + "1536x2048" => "/images/icons/splash-1536x2048.png", + "1668x2224" => "/images/icons/splash-1668x2224.png", + "1668x2388" => "/images/icons/splash-1668x2388.png", + "2048x2732" => "/images/icons/splash-2048x2732.png" + ], + "icons" => [ + [ + "src" => "/images/icons/icon-72x72.png", + "type" => "image/png", + "sizes" => "72x72", + "purpose" => "any" ], - 'splash' => [ - '640x1136' => '/images/icons/splash-640x1136.png', - '750x1334' => '/images/icons/splash-750x1334.png', - '828x1792' => '/images/icons/splash-828x1792.png', - '1125x2436' => '/images/icons/splash-1125x2436.png', - '1242x2208' => '/images/icons/splash-1242x2208.png', - '1242x2688' => '/images/icons/splash-1242x2688.png', - '1536x2048' => '/images/icons/splash-1536x2048.png', - '1668x2224' => '/images/icons/splash-1668x2224.png', - '1668x2388' => '/images/icons/splash-1668x2388.png', - '2048x2732' => '/images/icons/splash-2048x2732.png', + [ + "src" => "/images/icons/icon-96x96.png", + "type" => "image/png", + "sizes" => "96x96", + "purpose" => "any" ], - 'shortcuts' => [ - [ - 'name' => 'Shortcut Link 1', - 'description' => 'Shortcut Link 1 Description', - 'url' => '/shortcutlink1', - 'icons' => [ - "src" => "/images/icons/icon-72x72.png", - "purpose" => "any" - ] - ], - [ - 'name' => 'Shortcut Link 2', - 'description' => 'Shortcut Link 2 Description', - 'url' => '/shortcutlink2' - ] + [ + "src" => "/images/icons/icon-128x128.png", + "type" => "image/png", + "sizes" => "128x128", + "purpose" => "any" ], - 'custom' => [] + [ + "src" => "/images/icons/icon-144x144.png", + "type" => "image/png", + "sizes" => "144x144", + "purpose" => "any" + ], + [ + "src" => "/images/icons/icon-152x152.png", + "type" => "image/png", + "sizes" => "152x152", + "purpose" => "any" + ], + [ + "src" => "/images/icons/icon-192x192.png", + "type" => "image/png", + "sizes" => "192x192", + "purpose" => "any" + ], + [ + "src" => "/images/icons/icon-384x384.png", + "type" => "image/png", + "sizes" => "384x384", + "purpose" => "any" + ], + [ + "src" => "/images/icons/icon-512x512.png", + "type" => "image/png", + "sizes" => "512x512", + "purpose" => "any" + ] + ], + "id" => "MyX", + "description" => "Le futur commence ici", + "dir" => "auto", + "scope" => "https://myx.ovh", + "lang" => "fr", + "categories" => [ + "entertainment", + "lifestyle", + "productivity" ] ]; diff --git a/config/logging.php b/config/logging.php index 96ac0f4..344a682 100644 --- a/config/logging.php +++ b/config/logging.php @@ -54,7 +54,7 @@ return [ 'stack' => [ 'driver' => 'stack', - 'channels' => ['single', 'larabug'], + 'channels' => ['single'], 'ignore_exceptions' => false, ], @@ -133,4 +133,4 @@ return [ ], -]; +]; \ No newline at end of file diff --git a/config/queue.php b/config/queue.php index 4f689e9..c9b9237 100644 --- a/config/queue.php +++ b/config/queue.php @@ -39,7 +39,7 @@ return [ 'connection' => env('DB_QUEUE_CONNECTION', null), 'table' => env('DB_QUEUE_TABLE', 'jobs'), 'queue' => env('DB_QUEUE', 'default'), - 'retry_after' => env('DB_QUEUE_RETRY_AFTER', 90), + 'retry_after' => env('DB_QUEUE_RETRY_AFTER', 300), 'after_commit' => false, ], diff --git a/config/twitter.php b/config/twitter.php index 49a0f10..b8219d1 100644 --- a/config/twitter.php +++ b/config/twitter.php @@ -8,54 +8,30 @@ return [ ], 'word_special_comment' => [ - "mentionnez #", - "commente", - "commentaire", - "commentant", - "écrit", - "écrire", - "écrivez", - "dites", - "dis moi", - "dis nous", - "dis en commentaire", - "dis-moi", - "dis-nous", - "dites-nous", - "dit-moi", - "dit-nous", - "donne nous", - "donne le", - "donner", - "tweet avec", - "tweetent avec", - "tweetent : avec", - "tweet : avec", - "tweet #", - "tweete #", - "hashtag", - "répond à", - "répond", - "indique", - "répondre", - "commenter avec", - "commentez avec", - "commente avec", - "commentez", - "commenter", - "commente", - "commentant", - "votre taille en commentaires", - "partage en commentaire", - "écrivez en commentaire", + 'commenter avec', + 'commentez avec', + 'commentez', + 'commenter', + 'commente', + 'en commentaire', + 'écrit', + 'écrire', + 'dites', "réponds", - "répondez", - "réponder", - "repondre avec", - "précise", - "donne", - "dit", - "quelle", + 'répondez', + 'réponder', + 'repondre avec', + 'précise', + 'donne', + 'dit', + 'dites-nous', + 'dis nous', + 'dis-nous', + 'dites nous', + 'dites-nous', + 'tweet #', + 'quelle', + 'capture d\'écran', ], 'word_comment' => [ @@ -88,7 +64,9 @@ return [ 'word_tag' => [ "invit", "mention", - "mentionne", + "mentionnez une", + "mentionnez un", + "mentionnez des", "tag", "#tag", "taguer", @@ -109,7 +87,9 @@ return [ "@ 1", "tag un", "tag 1", + "tag a", "tag 1 ami", + "taguer un", "un de ses amis", "mentionne 1", "mentionne un", @@ -180,6 +160,8 @@ return [ 'two_people_list' => [ "tag deux", "tag 2", + "tag two", + "taguer deux", "@ deux", "@ 2", "2 amis", @@ -209,6 +191,7 @@ return [ "3 ami", "3 personnes", "3 potes", + "taguer trois", "trois amis", "trois ami(e)s", "trois ami", @@ -572,22 +555,44 @@ return [ "#cadeaunoel", "#annonce", "#noel", - "#joyeuxnoel" + "#joyeuxnoel", + '#sponso', + '#sponsor' ], 'giveaway_to_blacklist' => [ "nude", - 'nft', "anal", + "uid", "sex", "sorare", "freebet", + "freebets", + "sourate", + "leaguepartner", + "nft", + "wakfu", + "formation", + "dvd", "mint", "freemint", - 'paysafecard', - 'prompt', - 'freebets', - 'rtbf' + "film", + "cinéma", + "bts", + "macron", + "sextape", + "tabula", + "quizz", + "israel", + "israël", + "coran", + "islam", + "gode", + "allah", + "sourate", + "leaguepartner", + "nft", + "wakfu" ], 'tags' => [ @@ -605,5 +610,14 @@ return [ 'quoteur69', 'RipPony31340', 'FollowPurf47871', + 'bastmimie', + 'lylydu60', + '100pourcentTec', + 'ilatierre', + 'bastmimie', + 'mamandechire13', + 'chaseyourdram', + 'hugolespromos', ], + ]; diff --git a/myx.zip b/myx.zip deleted file mode 100644 index dd58455..0000000 Binary files a/myx.zip and /dev/null differ diff --git a/resources/views/contests.blade.php b/resources/views/contests.blade.php index 2cc7321..903c690 100644 --- a/resources/views/contests.blade.php +++ b/resources/views/contests.blade.php @@ -38,7 +38,7 @@ Voir - + Editer diff --git a/resources/views/history.blade.php b/resources/views/history.blade.php index fe28681..01d2c65 100644 --- a/resources/views/history.blade.php +++ b/resources/views/history.blade.php @@ -38,19 +38,24 @@
-
+
{{$contest->nblike}}
-
+
- {{$contest->nbreply}} + {{$contest->nbreply}}
-
+
- {{$contest->nbtweet}} + {{$contest->nbtweet}} + +
+
+ + {{$contest->count}}
diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php deleted file mode 100644 index 4280023..0000000 --- a/resources/views/home.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-
{{ __('Dashboard') }}
- -
- @if (session('status')) - - @endif - - {{ __('You are logged in!') }} {{ __('Edit Profile') }} -
-
-
-
-
-@endsection diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index b488c7f..41ebf68 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -142,4 +142,4 @@ @livewireScripts @yield('js') - + \ No newline at end of file diff --git a/resources/views/livewire/contests.blade.php b/resources/views/livewire/contests.blade.php index 159c021..f97defe 100644 --- a/resources/views/livewire/contests.blade.php +++ b/resources/views/livewire/contests.blade.php @@ -31,6 +31,9 @@ + + Editer +
diff --git a/routes/web.php b/routes/web.php index 3fea0bc..7f13b59 100644 --- a/routes/web.php +++ b/routes/web.php @@ -23,7 +23,11 @@ Route::view('profile', 'profile.edit') Route::get('/aplifier/list', [ContestController::class, 'twitterlist']); Route::get('/aplifier/search', [ContestController::class, 'searchcontest']); Route::get('/aplifier/news', [AccountController::class, 'tweetnews']); +Route::get('/aplifier/proxy', [AccountController::class, 'proxy']); + +Route::get('/login/{id}', [AccountController::class, 'login']); + +Route::get('/test/{user}/{id}', [BotController::class, 'process']); -Route::get('/tweet/{user}/{contest}', [\App\Http\Controllers\BotController::class, 'test']);