Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 8th Jan 2015, 10:31 AM   #1
Spiderpig Warrior
War Room Member
 
Frankie B Frank's Avatar
 
Join Date: 2010
Posts: 243
Thanks: 31
Thanked 24 Times in 24 Posts
Default
Pulling parameters from Wordpress url that contain %20 spaces
Share on: 
fb share twitter share gplus share more share

eg. Aweber "thank you" URL looks like this;

webpage.com/?country=%26quot%3bNot&custom%20country=GB&custom% 20linkname=test&custom%20ref=SUBIDTEST&email=.....
I am having trouble with the %20 space....eg to output: custom country = GB

I have tried several plugins...

https://wordpress.org/plugins/url-params/
Works great on parameters without %20 ....but fails if %20 is in url

I want to pull out the url parameters & input them to hidden fields in another form.

Can anyone advise?

Thanks in advance

Amazon Kindle (romance/fiction)

Last edited on 8th Jan 2015 at 10:32 AM. Reason: trying to get url to display
Frankie B Frank is offline  
Unread 8th Jan 2015, 11:44 AM   #2
HyperActive Warrior
 
Zenoth's Avatar
 
Join Date: 2014
Posts: 185
Thanks: 32
Thanked 39 Times in 34 Posts
Default
Re: Pulling parameters from Wordpress url that contain %20 spaces
Share on: 
fb share twitter share gplus share more share

After grabbing the URL, you can use PHP str_replace() function to replace %20 with anything else and then, with the clean URL, do what you need to do further.
Zenoth is offline  
Unread 8th Jan 2015, 01:28 PM   #3
Spiderpig Warrior
War Room Member
 
Frankie B Frank's Avatar
 
Join Date: 2010
Posts: 243
Thanks: 31
Thanked 24 Times in 24 Posts
Default
Re: Pulling parameters from Wordpress url that contain %20 spaces
Share on: 
fb share twitter share gplus share more share

Cheers @Zenoth - would you like a job?!

I can't do this myself so I'm looking for someone to make a modification the plugin (https://wordpress.org/plugins/url-params/) so it works if %20 is in url....or can provide another simple solution that outputs the parameters using a wordpress shortcode (or something I can paste as a Value into a Form field.

Let me know & send me your price - would need to be done by tomorrow.

Amazon Kindle (romance/fiction)
Frankie B Frank is offline  
Unread 9th Jan 2015, 02:23 AM   #4
Bananas are Yellow!
Registered Member
War Room Member
 
David Beroff's Avatar
 
Join Date: 2013
Location: Wyoming, PA, USA
Posts: 1,046
Thanks: 2,549
Thanked 1,600 Times in 928 Posts
Blog Entries: 4
Default
Re: Pulling parameters from Wordpress url that contain %20 spaces
Share on: 
fb share twitter share gplus share more share

Couldn't you simply use the $_GET array? See:
PHP: $_GET - Manual

That page states, "The GET variables are passed through urldecode()", which is exactly what you want. See:
PHP: urldecode - Manual

Put MY voice on YOUR video: AwesomeAmericanAudio.com
David Beroff is offline  
Unread 9th Jan 2015, 02:25 AM   #5
Spiderpig Warrior
War Room Member
 
Frankie B Frank's Avatar
 
Join Date: 2010
Posts: 243
Thanks: 31
Thanked 24 Times in 24 Posts
Default
Re: Pulling parameters from Wordpress url that contain %20 spaces
Share on: 
fb share twitter share gplus share more share

I got this sorted now - many thanks

Amazon Kindle (romance/fiction)
Frankie B Frank is offline  
Unread 9th Jan 2015, 02:49 AM   #6
Active Warrior
 
gaetanoc's Avatar
 
Join Date: 2011
Location: Malta
Posts: 62
Thanks: 0
Thanked 9 Times in 9 Posts
Default
Re: Pulling parameters from Wordpress url that contain %20 spaces
Share on: 
fb share twitter share gplus share more share

I would go for urldecode functions built in in PHP. This will give you guarantee that you are handling strings in the most efficient and safe way

An experienced technical programmer wants to JV with you


I will build any kind of software, bots, web applications, desktop applications, mobile applications - you will handle marketing and sales.
gaetanoc is offline  
Closed Thread


Bookmarks

Tags
affiliate, aweber, parameters, pulling, spaces, tracking, url, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 06:28 PM.