hey i want to encode my website url as a form of security but i have no idea how to go about doing so and help?
DamzWildfire
0
Junior Poster in Training
Recommended Answers
Jump to PostIn javascript you can encode your url like this:
var DWUrl = "http://www.daniweb.com"; //output: http://www.daniweb.com console.log(encodeURI(DWUrl)); //output: http%3A%2F%2Fwww.daniweb.com console.log(encodeURIComponent(DWUrl));
here's the description for the two func:
Encode URI
Jump to PostI'm unsure as to the use here. Could you give an example of what you're trying to accomplish?
Jump to PostNo, you are mixing Javascript and PHP, not possible.
I think you misunderstand what URL encoding is. You can encrypt parts of an URL, but not the complete one. It's better if you explain WHY you want to do this.
All 11 Replies
gon1387
22
Newbie Poster
DamzWildfire
0
Junior Poster in Training
diafol
DamzWildfire
0
Junior Poster in Training
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
DamzWildfire
0
Junior Poster in Training
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
DamzWildfire
0
Junior Poster in Training
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
DamzWildfire
0
Junior Poster in Training
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.