This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function checkBlackList($txt) { | |
$response = []; | |
$count=0; | |
foreach (DEFAULT_BLACKLIST as $word) { | |
if (stripos($txt, $word) !== false) { | |
$count++; | |
array_push($response, $word); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://telegram.org/js/telegram-web-app.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('BOT_TOKEN', 'SEU TOKEN'); | |
define('API_URL', 'https://api.telegram.org/bot'.BOT_TOKEN.'/'); | |
function processMessage($message) { | |
// processa a mensagem recebida | |
$message_id = $message['message_id']; | |
$chat_id = $message['chat']['id']; | |
if (isset($message['text'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> | |
<script src="https://telegram.org/js/telegram-web-app.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
function getProducts(){ | |
$.ajax({ | |
type:'GET', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('URL_API','https://api.unsplash.com/search/photos/?client_id=[CLIENT_ID]&query=computer&orientation=landscape&per_page=8'); | |
$response = file_get_contents(URL_API); | |
$json = json_decode($response, true); | |
$images = array(); | |
foreach($json['results'] as $image){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text( | |
Constants.APP_NAME, | |
), | |
), | |
body: Column( | |
crossAxisAlignment: CrossAxisAlignment.stretch, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InterstitialAd? _interstitialAd; | |
void _createInterstitialAd() { | |
InterstitialAd.load( | |
adUnitId: Constants.ADMOB_TEST_INTERSTITIAL_ID, | |
request: const AdRequest(), | |
adLoadCallback: InterstitialAdLoadCallback( | |
onAdLoaded: (InterstitialAd ad) { | |
print('$ad carregado'); | |
_interstitialAd = ad; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
WidgetsFlutterBinding.ensureInitialized(); | |
MobileAds.instance.initialize(); | |
runApp(MyApp()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest> | |
<application> | |
<!-- Exemplo AdMob app ID: ca-app-pub-3940256099942544~3347511713 --> | |
<meta-data | |
android:name="com.google.android.gms.ads.APPLICATION_ID" | |
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/> | |
</application> | |
</manifest> |