blog

Regex for Multi Language in PHP preg_match()

PHP Regular Expression also known as regex are powerful pattern matching algorithm that can be performed in a single expression. Regular expressions use arithmetic operators such as (+,-,^) to create complex expressions. They can help you accomplish tasks such as validating email addresses, IP address etc.

preg_match('/^[\pL]+$/u', $case); //allow multi language only
preg_match('/^[\pL\s]+$/u', $case); //allow multi language and spaces
Example:

"愛してます" letters only?
true
"我爱你" letters only?
true

Why use regular expressions

  • PHP Regular expressions simplify identifying patterns in string data by calling a single function. This saves us coding time.
  • When validating user input such as email address, domain names, telephone numbers, IP addresses,
  • Highlighting keywords in search results
  • When creating a custom HTML template. Regex in PHP can be used to identify the template tags and replace them with actual data.

Regular Expression Metacharacters

The above examples used very basic patterns; metacharacters simply allow us to perform more complex pattern matches such as test the validity of an email address. Let’s now look at the commonly used metacharacters.

MetacharacterDescriptionExample
.Matches any single character except a new line/./ matches anything that has a single character
^Matches the beginning of or string / excludes characters/^PH/ matches any string that starts with PH
$Matches pattern at the end of the string/com$/ matches guru99.com,yahoo.com Etc.
*Matches any zero (0) or more characters/com*/ matches computer, communication etc.
+Requires preceding character(s) appear at least once/yah+oo/ matches yahoo
\Used to escape meta characters/yahoo+\.com/ treats the dot as a literal value
[…]Character class/[abc]/ matches abc
a-zMatches lower case letters/a-z/ matches cool, happy etc.
A-ZMatches upper case letters/A-Z/ matches WHAT, HOW, WHY etc.
0-9Matches any number between 0 and 9/0-4/ matches 0,1,2,3,4
Regex Metacharacter Table

Difference of preg_match() and preg_match_all() functions

preg_match() stops looking after the first match. preg_match_all(), on the other hand, continues to look until it finishes processing the entire string. Once match is found, it uses the remainder of the string to try and apply another match.


<?php 
// TESTCASES FOR ALL UNICODE GOOGLE TRANSLATE LANGUAGE 2023
// ALLOWING MULTI LANGUAGE AND SPACES
$testCases = [ 'Unë të dua', 'i love you', 'አፈቅርሃለሁ', 'Ես սիրում եմ քեզ', 'মই আপোনাক ভাল পাওঁ', 'munsmawa', 'Mən səni sevirəm', "n b'i fɛ", 'я цябе кахаю', 'আমি তোমাকে ভালোবাসি', 'हम तोहसे प्यार करेलीं', 'Обичам те', "T'estimo", 'Miluji tě', 'އަހަރެން ތިބާ ދެކެ ލޯބިވަން', 'में तुगी हिरख करना', 'Melɔ̃ wò', 'Minä rakastan sinua', 'Ik hâld fan dy', 'Quérote', 'მიყვარხარ', "Σ'αγαπώ", 'હું તને પ્રેમ કરું છુ', 'Aloha wau iā ʻoe', 'אני אוהב אותך', 'मुझे तुमसे प्यार है', 'ég elska þig', "a hụrụ m gị n'anya", 'Ay-ayaten ka', 'Is breá liom tú', 'ನಾನು ನಿನ್ನನ್ನು ಪ್ರೀತಿಸುತ್ತೇನೆ', 'мен сені жақсы көремін', 'ខ្ញុំ​ស្រលាញ់​អ្នក', 'हांव तुजेर मोग करता', '사랑해요', 'A lɛk yu', 'تۆم خۆش دەوێت', 'Сени сүйөм', 'ຂ້ອຍ​ຮັກ​ເຈົ້າ', 'Es mīlu Tevi', 'Aš tave myliu', 'Ech hunn dech gär', 'Те сакам', 'हम अहां सँ प्रेम करैत छी', 'ഞാൻ നിന്നെ സ്നേഹിക്കുന്നു', 'inħobbok', 'मी तुझ्यावर प्रेम करतो', 'Би чамд хайртай', 'ମୁଁ ତୁମକୁ ଭଲପାଏ', 'မင်းကိုချစ်တယ်', 'म तिमीलाई माया गर्छु', 'Kocham cię', 'jag älskar dig', 'мин сине яратам', 'నేను నిన్ను ప్రేమిస్తున్నాను', 'مەن سېنى ياخشى كۆرىمەن', 'Tha gaol agam ort', 'Kuyaykim', 'أحبك', '愛してます', '我爱你', 'Anh Yêu Em', 'ฉันรักคุณ',
];
foreach($testCases as $case) {
    echo '<b>"' . $case . '" letters only? </b><br>' . var_export((bool) preg_match('/^[\pL\s]+$/u', $case), TRUE) . "\n<br><br>";
}

Result:

"Unë të dua" letters only?
true

"i love you" letters only?
true

"አፈቅርሃለሁ" letters only?
true

"Ես սիրում եմ քեզ" letters only?
true

"মই আপোনাক ভাল পাওঁ" letters only?
false

"munsmawa" letters only?
true

"Mən səni sevirəm" letters only?
true

"n b'i fɛ" letters only?
false

"я цябе кахаю" letters only?
true

"আমি তোমাকে ভালোবাসি" letters only?
false

"हम तोहसे प्यार करेलीं" letters only?
false

"Обичам те" letters only?
true

"T'estimo" letters only?
false

"Miluji tě" letters only?
true

"އަހަރެން ތިބާ ދެކެ ލޯބިވަން" letters only?
false

"में तुगी हिरख करना" letters only?
false

"Melɔ̃ wò" letters only?
false

"Minä rakastan sinua" letters only?
true

"Ik hâld fan dy" letters only?
true

"Quérote" letters only?
true

"მიყვარხარ" letters only?
true

"Σ'αγαπώ" letters only?
false

"હું તને પ્રેમ કરું છુ" letters only?
false

"Aloha wau iā ʻoe" letters only?
true

"אני אוהב אותך" letters only?
true

"मुझे तुमसे प्यार है" letters only?
false

"ég elska þig" letters only?
true

"a hụrụ m gị n'anya" letters only?
false

"Ay-ayaten ka" letters only?
false

"Is breá liom tú" letters only?
true

"ನಾನು ನಿನ್ನನ್ನು ಪ್ರೀತಿಸುತ್ತೇನೆ" letters only?
false

"мен сені жақсы көремін" letters only?
true

"ខ្ញុំ​ស្រលាញ់​អ្នក" letters only?
false

"हांव तुजेर मोग करता" letters only?
false

"사랑해요" letters only?
true

"A lɛk yu" letters only?
true

"تۆم خۆش دەوێت" letters only?
true

"Сени сүйөм" letters only?
true

"ຂ້ອຍ​ຮັກ​ເຈົ້າ" letters only?
false

"Es mīlu Tevi" letters only?
true

"Aš tave myliu" letters only?
true

"Ech hunn dech gär" letters only?
true

"Те сакам" letters only?
true

"हम अहां सँ प्रेम करैत छी" letters only?
false

"ഞാൻ നിന്നെ സ്നേഹിക്കുന്നു" letters only?
false

"inħobbok" letters only?
true

"मी तुझ्यावर प्रेम करतो" letters only?
false

"Би чамд хайртай" letters only?
true

"ମୁଁ ତୁମକୁ ଭଲପାଏ" letters only?
false

"မင်းကိုချစ်တယ်" letters only?
false

"म तिमीलाई माया गर्छु" letters only?
false

"Kocham cię" letters only?
true

"jag älskar dig" letters only?
true

"мин сине яратам" letters only?
true

"నేను నిన్ను ప్రేమిస్తున్నాను" letters only?
false

"مەن سېنى ياخشى كۆرىمەن" letters only?
true

"Tha gaol agam ort" letters only?
true

"Kuyaykim" letters only?
true

"أحبك" letters only?
true

"愛してます" letters only?
true

"我爱你" letters only?
true

"Anh Yêu Em" letters only?
true

"ฉันรักคุณ" letters only?
false

Capitalism At Its Finest

“Capitalism” is derived from capital, which evolved from capitale, a late Latin word based on caput, meaning “head”—which is also the origin of “chattel” and “cattle” in the sense of movable property (only much later to refer only to livestock).

Capitalism is often thought of as an economic system in which private actors own and control property in accord with their interests, and demand and supply freely set prices in markets in a way that can serve the best interests of society. The essential feature of capitalism is the motive to make a profit.

Capitalism refers to an economic system in which a society’s means of production are held by private individuals or organizations, not the government, and where products, prices, and the distribution of goods are determined mainly by competition in a free market.

Characteristics of Capitalism

  • Private Property. Private property rights are essential to capitalism.
  • Innovation. It was the first modern economist, Adam Smith, who noted in 1776 that individuals naturally seek their own advantage.
  • Division of Labor.
  • Price.
  • Profit.
  • Rules.
  • Goods and Services.

These capitalist economies operate on the pillars of private property, supply, and demand, competition, freedom, and incentive. Today we will explore what these entail when it comes to capitalism.

Capitalism—unlike socialism, Marxism or authoritarianism—rewards individual innovation and work ethic. Anyone can improve their station in life by hard work or coming up with a new idea.

Capitalism affords economic freedom, consumer choice, and economic growth. Socialism, which is an economy controlled by the state and planned by a central planning authority, provides for a greater social welfare and decreases business fluctuations.

Who invented capitalism? Modern capitalist theory is traditionally traced to the 18th-century treatise An Inquiry into the Nature and Causes of the Wealth of Nations by Scottish political economist Adam Smith, and the origins of capitalism as an economic system can be placed in the 16th century.

While pure capitalism in a country represents a free market economy, the elements of communism are easily seen in command economies. Furthermore, capitalism motivates entities to work hard and innovate to make a profit, whereas communism does not emphasize or focus on providing an incentive to trigger hard work.

6 Benefits Of Capitalism & Why We Love It

  • Good Health. Thanks to the benefits of capitalism, every man, woman and child has the opportunity to eat fresh, wholesome foods every day.
  • Social Contribution.
  • Professional Services Choice.
  • Healthy Competition.
  • Personal Freedom.
  • Ownership and Opportunity.

4 types of capitalism?

It classifies capitalist economies into four categories: oligarchic capitalism, state-guided capitalism, big-firm capitalism, and entrepreneurial capitalism.

Disadvantages of Capitalism

  • Unequal distribution of wealth.
  • Could result in costs to the environment.
  • Propensity for industrial unrest.
  • Labour could be under-valued and exploited.
  • Capital could reside with a few people.

Apa itu Doxing?

Kata Doxing berasal dari bahasa Inggris, yang berasal dari kata document dan biasa disingkat menjadi dox. Menurut kamus Cambridge, doxing adalah tindakan mempublikasikan data atau informasi pribadi seseorang. Seseorang menemukan lalu membagikan informasi pribadi ini seperti nama panjang, alamat rumah, nomor ponsel, dan lainnya.

Doxing adalah kependekan dari Dropping Dox (dokumen), dan hanya memiliki konotasi negatif. Niat doxers adalah untuk melecehkan korban dengan mengungkapkan informasi yang memberatkan, memfitnah atau hanya sangat memalukan.

Doxing Deanonymizing

Doxing yang satu ini dilakukan dengan mengungkapkan identitas seseorang yang sebelumnya atau dari awal menganonimkan diri. Anonim berarti tidak menggunakan nama asli.

Contohnya adalah membongkar akun media sosial milik seseorang yang anonim.

Padahal, mereka yang memilih untuk menganonimkan identitasnya memiliki alasan tersendiri yang seharusnya dihargai.

Doxing Targeting

Doxing targeting dilakukan dengan mengungkapkan informasi spesifik tentang seseorang yang memungkinkan mereka untuk dihubungi atau ditemukan. Dengan kata lain, keamanan online mereka telah dilanggar.

Contoh dari doxing jenis ini adalah disebarkannya nomor telepon, alamat rumah, atau kata sandi akun seseorang. Data-data tersebut sangatlah krusial sehingga dapat membahayakan bagi korban.

Doxing Delegitimizing

Jenis doxing yang terakhir ini dilakukan dengan mengungkapkan informasi yang bersifat sensitif atau intim tentang seseorang.

Disebarkannya data tersebut dapat merusak kredibilitas atau reputasinya karena sifatnya yang sangat pribadi sehingga tidak banyak diketahui oleh orang lain.

Beberapa contohnya adalah catatan medis, keuangan pribadi, catatan hukum, atau pesan dan foto pribadi yang biasanya sulit atau tidak bisa terlihat oleh publik.

Korban pun pasti memiliki alasan untuk menyimpan sendiri data-data tersebut.

Oleh karena itu, doxing jenis ini benar-benar melanggar dan mengganggu privasi sang korban.


Informasi berikut ditargetkan dalam serangan doxing:

  • Foto pribadi
  • Kontak informasi
  • Akun email
  • Foto anggota keluarga
  • Nomor Jaminan Sosial (SSN)
  • Nomor telepon
  • Nama lengkap Anda
  • Nama asli
  • Detail pribadi yang memalukan
  • Alamat rumah
  • Informasi Kartu Kredit
  • Detail rekening bank
  • Sejarah kriminal

Mengapa Seseorang Melakukan Doxing? 

Doxing dapat dilakukan untuk berbagai alasan, termasuk untuk membantu penyelidikan hukum atau untuk digunakan dalam analisis bisnis, namun dalam konteks cyberbullying, doxing digunakan untuk tujuan pemaksaan, mempermalukan online, pemerasan, dan bahkan keadilan main hakim sendiri. Ini sering dikaitkan dengan penggunaan oleh ‘massa’ online yang berusaha mengintimidasi atau mengancam korban dengan membuat mereka takut akan keselamatan dan kemanan pribadi mereka  mereka . Terkadang, pelaku dapat menggunakan ancaman membocorkan informasi pribadi untuk memanipulasi atau berpotensi memeras seseorang agar melakukan atau mengatakan hal-hal yang tidak nyaman bagi mereka.


Cara Mencegah Doxing

Doxing bisa dicegah jika seseorang tidak mengunggah informasi penting dan pribadi secara online. Anda perlu memastikan dan berhati-hati ketika mengunggah informasi di media sosial. Berikut cara mencegah doxing:

1. Pakai Jaringan Pribadi Mengutip dari fortinet.com, anda bisa menggunakan jaringan pribadi atau Virtual Private Network (VPN). Pemakaian VPN membantu melindungi informasi dan alamat IP asli dapat disembunyikan.

2. Memakai Kata Sandi Kuat Ketika anda masuk ke situs website atau aplikasi, gunakan kata sandi kuat. Anda bisa membuat kata sandi yang sulit diprediksi dan ditebak oleh orang lain.

3. Mengubah Pengaturan Pribadi Langkah ketiga menghindari Doxing yaitu mengubah pengaturan pribadi. Anda bisa mengubah pengaturan privasi media sosial. Anda bisa membuat media sosial hanya dilihat orang beberapa orang. Selain itu jangan berikan informasi pribadi seperti tanggal lahir, kota asal, dan lainnya.

4. Hapus Email Phishing Cara lain yaitu menghapus email spam atau tidak klik tautan dari pesan email. Anda perlu mewaspadai email phising untuk meminta alamat rumah, kata sandi, dan informasi pribadi. Contohnya saja email dari perusahaan kartu kredit atau bank meminta data pribadi. Hal ini termasuk penipuan, karena lembaga keuangan tidak pernah meminta informasi melalui email.

5. Pakai Akun Email Terpisah Anda bisa menggunakan email terpisah untuk media sosial dan pribadi. Gunakan email kantor dan bisnis untuk pekerjaan dan profesional. anda bisa menggunakan email terpisah untuk akun media sosial. Selain itu pakai kata sandi yang berbeda untuk media sosial anda.

6. Waspadai Izin Aplikasi Cara menghindari doxing yaitu mewaspadai izin aplikasi. Sebelum melakukan pendaftaran, anda bisa membaca terlebih dahulu ketentuan yang ditawarkan aplikasi. Contohnya saja penawaran mengizinkan akses informasi dari media sosial. Hal ini perlu diwaspadai jika aplikasi tidak punya keamanan memadai. Peretas doxing dapat menembus sistem dan mendapatkan informasi pengguna.

7. Melindungi Akun Keuangan Seorang doxer dapat membagikan informasi keuangan seseorang. Anda perlu mengambil langkah untuk menghubungi bank dan penyedia kartu. Pastikan kartu anda terlindungi dan ditutup untuk mencegah doxing.

Jerat Hukum Doxing

Pada intinya, perilaku doxing tidak dapat dibenarkan atas alasan apapun. Data pribadi seseorang merupakan ranah privat yang tidak dapat dibagikan begitu saja. Namun, sayangnya peraturan perundang-undangan di Indonesia belum mengatur perlindungan data pribadi dalam satu undang-undang khusus.

Disarikan dari Dasar Hukum Perlindungan Data Pribadi Pengguna Internet, peraturan tentang perlindungan data pribadi sebenarnya sudah dirancang dalam RUU Perlindungan Data Pribadi. Namun, hingga saat ini, RUU tersebut belum disahkan dan aturan mengenai perlindungan data pribadi masih terpisah dan tersebar dalam beberapa peraturan.

Bentuk perlindungan data pribadi secara tersirat dapat ditemukan dalam ketentuan Pasal 26 ayat (1) UU ITEjo. UU 19/2016 yang menerangkan bahwa kecuali ditentukan lain oleh peraturan perundang-undangan, penggunaan setiap informasi melalui media elektronik yang menyangkut data pribadi seseorang harus dilakukan atas persetujuan orang yang bersangkutan.

Lebih lanjut, Penjelasan Pasal 26 ayat (1) UU ITE jo. UU 19/2016 menerangkan bahwa dalam pemanfaatan teknologi informasi, perlindungan data pribadi merupakan salah satu bagian dari hak pribadi (privacy rights). Hak pribadi mengandung pengertian sebagai berikut:

  1. Hak pribadi merupakan hak untuk menikmati kehidupan pribadi dan bebas dari segala macam gangguan.
  2. Hak pribadi merupakan hak untuk dapat berkomunikasi dengan Orang lain tanpa tindakan memata-matai.
  3. Hak pribadi merupakan hak untuk mengawasi akses informasi tentang kehidupan pribadi dan data seseorang.

Kemudian, apabila terjadi penggunaan data pribadi tanpa izin sebagaimana yang dilakukan pelaku doxing, ketentuan Pasal 26 ayat (1) dan (2) UU ITE jo. UU 19/2016 menerangkan bahwa korban dapat mengajukan gugatan atas kerugian yang ditimbulkan.


4 Pelanggaran Bisa Dipidana dengan UU PDP

  1. Berdasarkan UU PDP, mengungkapkan data pribadi orang lain seperti itu bisa berujung pidana maksimal penjara empat tahun dan denda maksimal Rp4 miliar.
  2. Pelanggaran kedua adalah mengumpulkan data pribadi secara tidak sah, pelaku bisa dikenakan pidana penjara maksimal lima tahun dan denda maksimal Rp5 miliar.
  3. Menggunakan data pribadi yang bukan miliknya. Contoh pelanggaran ini misalnya mendaftarkan kartu SIM dengan KTP milik orang lain. Pelaku bisa dikenakan pidana penjara maksimal 5 tahun dan denda maksimal Rp5 miliar.
  4. Membuat data pribadi palsu atau memalsukan data pribadi. Pelaku pelanggaran akan diberikan sanksi pidana maksimal enam tahun dan denda Rp6 miliar.

Dampak Doxing Bagi Korban

  • Rasa malu di depan umum dan mendapat penghinaan dari publik
  • Mendapat diskriminasi. Hal tersebut dapat terjadi jika karakteristik pribadi dirinya terungkap
  • Mengalami cyberstalking dan physical stalking
  • Mengalami pencurian identitas dan penipuan dalam hal finansial
  • Rusaknya reputasi personal maupun profesional. Lambat laun, hal tersebut akan menyebabkan kerugian secara sosial dan finansial
  • Meningkatnya kecemasan
  • Menurunnya kepercayaan dan harga diri

Kesimpulan 

Meskipun mungkin tidak sepenuhnya dianggap ilegal, doxing dapat memiliki efek yang mengubah hidup dan bertahan lama pada korban . Di dunia sekarang ini, kita cenderung menaruh banyak detail pribadi secara online tanpa berpikir dua kali. Yang diperlukan hanyalah satu interaksi dengan seseorang di internet menjadi buruk dan semua detail itu bisa menjadi target pengguna internet yang jahat. Ini dapat mengakibatkan segala macam masalah, seperti misalnya memukul . Singkatnya, Anda perlu melindungi identitas Anda secara online.

References:

  1. https://www.sekawanmedia.co.id/blog/apa-itu-doxing/
  2. https://katadata.co.id/agung/berita/62e8f01c48344/doxing-adalah-penyebaran-data-pribadi-tanpa-izin-ini-penjelasannya
  3. https://www.hukumonline.com/klinik/a/dasar-hukum-perlindungan-data-pribadi-pengguna-internet-lt4f235fec78736
  4. https://tirto.id/mengenal-doxing-di-media-sosial-bahaya-dan-cara-mencegahnya-f5lm
  5. dst…

Mobile Legends Top Global Rank 2023-02-xx

Mobile Legends Rank Tiers

Ranks in Mobile Legends determines the players’ proficiency and experience in the game. The better you are in the game, the higher you can climb the ranked ladder. There are two types of ranked systems in MLBB, namely the Stars system which applies up to Legend rank, and the Points system for Mythic and above rank. Players will have to earn the required amount of stars in each division in order to get promoted to a higher rank.

Top Global Rank February 2023

  1. Wiky NAFILFORCE
  2. HazeTzy.
  3. ToYy
  4. Paangqt
  5. Jibon107
  6. ACH1L3SS
  7. Vokerr
  8. Mogu
  9. . Rast
  10. JackFrozt

Players will be placed in one of the seven ranks based on their skills in the game with the Warrior being the lowest rank followed by the Elite, Master, Grandmaster, Epic, Legend, and the highest rank, Mythic.

Here is a full list of all ML tiers ranging from the lowest to the highest.

  • Warrior III
  • Warrior II
  • Warrior I
  • Elite IV
  • Elite III
  • Elite II
  • Elite I
  • Master IV
  • Master III
  • Master II
  • Master I
  • Grandmaster IV
  • Grandmaster III
  • Grandmaster II
  • Grandmaster I
  • Epic IV
  • Epic III
  • Epic II
  • Epic I
  • Legend IV
  • Legend III
  • Legend II
  • Legend I
  • Mythic
  • Glorious Mythic (Only top 50 players in each server)

References: Gosugamers

Why Is chess.com Crashing? 502 Database Overloaded

Due to the sudden surge of players, Chess.com’s servers have crashed and players might experience errors while playing chess or solving puzzles. Servers are likely to crash during peak hours which Chess.com states to be around “noon to 4:00 pm ET.” Chess.com server crashes due to heavy traffic in Jan 25, 2023

New chess.com App Keeps Crashing

Messi x Ronaldo playing chess

Then came the FIFA season in November 2022, when Luis Vuitton released an internet-breaking photo featuring the two biggest football superstars in the world, Lionel Messi and Cristiano Ronaldo, playing a game of chess. The game of chess even depicts the same position as a Carlsen vs Nakamura game in 2007.

Create API for OpenAI’s GPT-3

To create an API for OpenAI’s GPT-3, you’ll need to use the OpenAI API. The API provides a simple way to send requests to GPT-3 and receive responses in the form of natural language text. Here’s an example of how you can use the API to generate text:

  1. Obtain API credentials: To use the OpenAI API, you’ll need to sign up for an API key.
  2. Send a request to the API: You can send a request to the API using any HTTP client library. Here’s an example using PHP’s curl library:
<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://api.openai.com/v1/engines/text-davinci-002/jobs");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{
    \"prompt\": \"What is the capital of France?\",
    \"max_tokens\": 100,
    \"temperature\": 0.5
}");
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = "Content-Type: application/json";
$headers[] = "Authorization: Bearer <YOUR_API_KEY>";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

echo $result;

In this example, the curl library is used to send a POST request to the OpenAI API. The request includes a prompt (the text prompt to generate a response for), max_tokens (the maximum number of tokens to generate in the response), and temperature (the randomness of the response). The API key is passed in the Authorization header.

  1. Parse the API response: The API response will be in JSON format. You can parse the response using any JSON parsing library. Here’s an example using PHP’s json_decode function:
$response = json_decode($result, true);
echo $response['choices'][0]['text'];

In this example, the json_decode function is used to parse the API response and extract the generated text from the response. The generated text will be stored in the text field of the first item in the choices array.

[AmpAnalytics ] No triggers were found in the config. No analytics data will be sent.


<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>

<amp-analytics type="googleanalytics" config="https://amp.analytics-debugger.com/ga4.json" data-credentials="include">
<script type="application/json">
{
    "vars": {
                "GA4_MEASUREMENT_ID": "G-XXXXXXXX",
                "GA4_ENDPOINT_HOSTNAME": "www.google-analytics.com",
                "DEFAULT_PAGEVIEW_ENABLED": true,    
                "GOOGLE_CONSENT_ENABLED": false,
                "WEBVITALS_TRACKING": false,
                "PERFORMANCE_TIMING_TRACKING": false,
                "SEND_DOUBLECLICK_BEACON": false
    }
}
</script>
</amp-analytics> 

As a small sneak-peak, this is the meaning for all the configuration switches.

FEATURE NAMEDESCRIPTION
GA4_MEASUREMENT_IDYour Measurement IDG-XXXXXXXX
GA4_ENDPOINT_HOSTNAMEOverride the default endpoint domain. In case you want to send the hits to your own server or a Server Side GTM Instance.
GOOGLE_CONSENT_ENABLED&gcs parameter will be added to the payloads with the current Consent Status
WEBVITALS_TRACKINGIf you enable this a webvitals event will fire 5 seconds after the page is visible
PERFORMANCE_TIMING_TRACKINGWhatever you want to push a performance_timing event including the current page load performance timings
DEFAULT_PAGEVIEW_ENABLEDIf enabled a page_view event will fire on the page load
SEND_DOUBLECLICK_BEACONSend a DC Hit

What Is The Meaning of “Put A Cork In It” Idiom

Put A Cork In It used as a rude way to tell someone to stop talking and especially to stop complaining or talking.

Chiefly US informal for telling someone to stop talking or going on about something, dates from the early 1900s, from the obvious allusion to closing off a bottle with a cork. See also Corker.

Example:

  1. Why don’t you put a cork in it! I’m sick of your whining!
  2. Dad told me to put a cork in it when I wouldn’t stop talking.
https://josuamarcelc.com/wp-content/uploads/Tidehunter-Put-A-Cork-In-It.mp3
“Put A Cork In It!”

To stop talking and be quiet. Usually used as an imperative. Put a cork in it, you two! I don’t want to hear any more arguing until we get to Grandma’s house.


Source: Wikipedia

Synonym of put a sock in it (“be quiet”)


2 cork /ˈkoɚk/ verb

corks; corked; corking

Britannica Dictionary definition of CORK

[+ object]

: to close (something, such as a bottle) with a cork

  • Please cork the wine.
  • corked bottle of wine

— opposite uncork; see also corked

: to put cork inside (something, such as a baseball bat)

  • a player who has been accused of illegally corking his bats
  • corked bat

IDCloudHost Voucher Promo Rp. 25,000.-

PT Cloud Hosting Indonesia (IDCloudHost) Merupakan Salah Satu Web Hosting Provider yang Ada di Indonesia dengan Menawarkan Layanan Seperti Pendaftaran Domain, Cloud Hosting, Server (VPS & Dedicated Server), Reseller Domain & Hosting, dan Beberapa Layanan Lainnya.

Link Voucher Promo IDCloudHost

https://console.idcloudhost.com/referral/4f9y61

IDCloudHost (PT Cloud Hosting Indonesia) adalah penyedia layanan Web Hosting Provider berbasis SSD Cloud Hosting yang mempunyai tujuan untuk selalu menjaga website tetap hidup dan cepat di akses dari berbagai negara. Saat ini tersedia Beberapa Data Center Utama yang dapat Anda gunakan dengan berlangganan menggunakan layanan Kami.

Exit mobile version