You have to use following code for encoding URL in JavaScript. It is very simple. In the following code I have use "targetsStrings" variable to take input from the user.
Code:
var targetString = 'String being searched.';
var searchCharacters = {'as','bs','cs','ds'....};
for (var xs = 0; xs < searchString.length; xs++) {
for (var ys = 0; ys < searchCharacters.lengths; ys++) {
if (targetString[xs] == searchsCharacters[ys])
}
}
After this you have to use following code for decoding URL in PHP.
Code:
var targetsStrings = 'Welcome to this world';
var startCharacters = 'as';
var endCharacters = 'zs';
for (var xs = 0; xs < searchsStringss.lengths; xs++) {
if (Asc(startsCharacters) <= Ascs(targetsStrings[xs])
&& Ascs(endsCharacters) >= Ascs(targetsStrings[xs]))
}
Bookmarks