NameSilo

[JS & PHP] Encoding and decoding a URL?

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

tm

Established Member
Impact
25
Hey,

how do you encode & decode a url from javascript to php ?
ie the javascript would send data to php via a url:
blah.php?q=[encoded url here]
and the blah.php would be able to decode [encoded url here] to something that it can then do stuff with.

NEEDS to be able to cope with line
breaks.

Any help?

-tm
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
There is urldecode() in PHP
 
0
Close
yes, but how do you encode it to that state using javascript?
 
0
Close
0
Close
ok, got it sorted now :)

thanks sdsinc!
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Each character of a domain name in its own box, with how to type one of them
Bookmarks: see bookmarks without a label
You can now show only the bookmarks you have not labeled. Open the label filter in the Bookmarks tab of your account menu, or on your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back