Dynadot โ€” .com Transfer

[JS & PHP] Encoding and decoding a URL?

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

thanks sdsinc!
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back