Hi, anybody have sockets programming tutorial with PHP?

|
Tecnico_Sordo 2021-01-13 17:44:21
When say “good” what you mean?
kishor10d 2021-01-13 17:45:03
2021-01-13 15:21:15
Hello guys pls suggest me good cloud hosting

AWS

Tecnico_Sordo 2021-01-13 17:45:11
Che.ap? Scallable?
ashutoshk043 2021-01-13 18:33:19
Hey anyone can create exit popup for mobile.
DavidDehbs 2021-01-13 19:14:15
hi guys, someone knows how to consume soap with various labels on the body as sublevel
Krish9773 2021-01-14 00:42:35
Hey anyone know that how to validate select option to choose the size chart after adding item into cart please help me
Krish9773 2021-01-14 00:42:47
Please help me anyone
kameshindore 2021-01-14 00:50:52
2021-01-12 09:10:24
Problem Solved❤️

Happy for u. 👍

jbs98 2021-01-14 07:03:29
can we implement zoom webRTC with php n javascript
CRUD_Mehra 2021-01-14 07:24:44
Hi, anybody have sockets programming tutorial with PHP???
It’s urgent.
Caonima14344 2021-01-14 08:12:25
can anyone help me in php
Caonima14344 2021-01-14 08:12:51
i m new in the group
Caonima14344 2021-01-14 08:25:09
anyone please?
GeorgeMensah 2021-01-14 08:28:26
What help you need?
Caonima14344 2021-01-14 08:45:41
I need to add textbox and button in my code so i can manually encrypt and decrypt string
Caonima14344 2021-01-14 10:06:28
Please
kishor10d 2021-01-14 10:07:04
Caonima14344 2021-01-14 08:45:41
I need to add textbox and button in my code so i can manually encrypt and decrypt string

To achieve textbox and button you have to use html.

For encrypt-decrypt, you can use php

Caonima14344 2021-01-14 10:07:21
I have my code here
Caonima14344 2021-01-14 10:07:51
Can u please help me?
kishor10d 2021-01-14 10:09:38
Where is the code???
Caonima14344 2021-01-14 10:10:15
<?php

// enter the word to be encrypted
$wordToBeEncrypted = “abcd”;

echo “The Word to be encrypted will be $wordToBeEncrypted <br> <br>”;

// break the word into an array
$lettersOfWord = str_split($wordToBeEncrypted);

// uncomment the code below to see the array that contains the letters of the chosen word
// echo “<pre>” . print_r($lettersOfWord) . “</pre>”;

// create an array that will contain of all of the letters that will be used for encryption
$array = array(‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘o’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘u’, ‘v’, ‘w’, ‘x’, ‘y’, ‘z’);

// create and array that will hold the encrypted letters
$encryptedArrayOfLetters = array();

// use foreach loop to iterate through the array of letters that has been broken down from the $wordToBeEncrypted
foreach ($lettersOfWord as $row) {
$letter = $row; // this contains the letter of the wordToBeEncrypted

// find the index of the letter that is in the $array variable
$index = array_search($letter, $array, true);
// echo “$index -> $letter <br>”; -> uncomment me to see the index with their letter respectively

// general algo for encrypting
// the first letter of the wordToBeEncrypted is a; which is at index zero.
// just incriment the index by 3 which will return the letter “d”

// general algo will be implemented under this comment
$encodedLetter = $array[$index + 3];

// append the encoded letter into the array
array_push($encryptedArrayOfLetters, $encodedLetter);
}

// the process of encryption is complete its now time to assemble the letters in the appended array
$encodedWord = join(“”, $encryptedArrayOfLetters);

echo “The encrypted word will be: $encodedWord <br>”;

// time for decoding

// use the encoded word for decoding

// break the encoded word into an array
$brokenEncodedWord = str_split($encodedWord);

// create an array to store the letters. the decoded letters will be appended in this array
$decodedArrayOfLetters = array();

foreach ($brokenEncodedWord as $row) {
$decodedLetter = $row;

// decrement the index to turn back the decoded letter
# find the index of the letter in the $array variable
$decodedIndex = array_search($decodedLetter, $array, true);

// decrement the index to turn back the decoded letter into it’s original letter.
$originalLetter = $array[$decodedIndex – 3];

// append the decoded letter into the decoded array of letters variable
array_push($decodedArrayOfLetters, $originalLetter);
}

// assemble the decoded array of letters array into a word
$decodedWord = join(”, $decodedArrayOfLetters);

echo “<br> The decoded word will be: $decodedWord”;

// write into a text file
$myfile = fopen(“newfile.txt”, “w”) or die(“Unable to open file!”);
$txt = “The Word to be encrypted will be $wordToBeEncrypted n The encrypted word will be: $encodedWord n”;
fwrite($myfile, $txt);
$txt = “The decoded word will be: $decodedWord n”;
fwrite($myfile, $txt);
fclose($myfile);

Caonima14344 2021-01-14 10:11:30
I want to enter my the string manually
kishor10d 2021-01-14 10:11:34
Wow, you are encrypting at your own
kishor10d 2021-01-14 10:11:51
Just write html the
kishor10d 2021-01-14 10:12:05
Then
Caonima14344 2021-01-14 10:12:08
yes and after it saves it on txt file
kishor10d 2021-01-14 10:13:33
Just search for it. I don’t think the person who can write his own algorithm can’t figure out how to create form in html and make the input dynamic
Caonima14344 2021-01-14 10:14:15
I didnt make it alone
Caonima14344 2021-01-14 10:16:08
thats why im asking on how to do it
Caonima14344 2021-01-14 10:18:55
I’ll really appriciate it
M Sajid Imran 2021-01-14 10:49:17
Krish9773 2021-01-14 00:42:35
Hey anyone know that how to validate select option to choose the size chart after adding item into cart please help me

Use required attribute….

Krish9773 2021-01-14 10:49:54
I use this
Krish9773 2021-01-14 10:50:05
But not working
Krish9773 2021-01-14 10:51:25
Please sir help me
M Sajid Imran 2021-01-14 10:51:49
Check your code again….maybe any mistake in,your code….
|