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
exports.handler = function(context, event, callback) { | |
const fromNo = event.From; | |
const message = event.Body; | |
let client = context.getTwilioClient(); | |
client.messages | |
.create({ | |
from: `whatsapp:${context.TWILIO_NO}`, | |
body: `Forwarded message *${message}* from *${fromNo}*.`, |
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
function addComment() { | |
const commentContent = document.getElementById('comment').value; | |
if (commentContent) { | |
const list = document.getElementById('commentList'); | |
const newComment = document.createElement('li'); | |
newComment.appendChild(document.createTextNode(commentContent)); | |
list.appendChild(newComment); | |
} |
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
# Repalce 1234567890:tHiSiStHeToKeNr3C31v3DfRoMb0Tf@Th3r with your token given by @BotFather | |
TELEGRAM_BOT_API=1234567890:tHiSiStHeToKeNr3C31v3DfRoMb0Tf@Th3r |
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 | |
/** | |
* File: weighted-link-rotator.php | |
* | |
* This is a simple implementation of weighted link rotator. PHP weighted link rotator is a code to display one link chosen randomly | |
* from a list of URLs. However each URL has a weighted probability. A URL may have a bigger chance to be displayed when it has bigger | |
* probability. | |
*/ | |
/** |