how do i grab the url in php?
I want to grab the 'entire' url, including any special characters like & and #, from a site. I then want to replace the characters with something a browser can read for example:
& = %26
# = %23
I tried URL encoding but it only grabs the part until the #, which it treats as an anchor.
Thanks for your help!