/    Sign up×
Community /Pin to ProfileBookmark

How can I do this: User types URL into form, form appends a string to the url, and

Noob here.

How can I do this:

User types URL into a form on my page, a script takes that url and appends a string to the url, the script also changes all “:” %3A into and “/” into %2F and all “?” into %3F (basically change all characters into URL encoded characters), then the script opens a new tab to the newly contructed URL.

So with more details, the user will type a Google Play app URL (ex [url]https://play.google.com/store/apps/details?id=com.proletariat.worldzombination[/url])

The type that into my form, then some how I need to it add this to the start: [url]http://download.freeapk.ru/en.php?[/url]

Then I need it to look like this: [url]http://download.freeapk.ru/en.php?package=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.proletariat.worldzombination[/url]

Is this possible?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 04.2015 — [url=http://php.net/urlencode]urlencode()[/url] takes care of the encoding issue. The rest is just basic form processing and string concatenation.
×

Success!

Help @EasyCoding spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...