PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Fri Dec 30, 2016 8:30 pm
This inhales the ?object from the URL so I was wondering what I can do to leverage this more?
This comes from wrappers and other chunks of functionality I have accumulated here and there
Code: Select all
$base = $_SERVER["QUERY_STRING"];
gets a general string
so how about the case here I need to parse off more than one item such as an amazon AISN and perhaps a location tag etc
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Fri Dec 30, 2016 8:49 pm
Then don't do the fancy "?object" thing I wrote and use normal GET parameters.
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Fri Dec 30, 2016 9:29 pm
I was thinking of using my database for more, got it so run with it is my mantra
so far these recent CPM ads have earned more than old product ads so i have mothballed a lot of old code
I noticed WP does not allow more complex queries either, and I was wondering how come
eg cat=5 and dog=4 type of an idea
a lot of game reviews have multiple categories but WP is not able to select from 2 or more
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Fri Dec 30, 2016 10:34 pm
Because they aren't using WP? Or they modified it to work? Or maybe the capability is buried somewhere in there.
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Sat Dec 31, 2016 7:15 pm
I asked the WP team, not doing that yet. So much for leveraging SQL.
so what do i need to do to tease apart a multiple part URL argument
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Sat Dec 31, 2016 7:22 pm
If you're able to execute any code at all then you should have $_GET available...
Vegan
Forum Regular
Posts: 574 Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:
Post
by Vegan » Fri Jan 13, 2017 11:06 am
Code: Select all
void parse_str ( string $encoded_string [, array &$result ] )
seems to be the best i could find to clean up $base which has the URL of the moment
by using PHP more effectively I was looking at more resources for web sites
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP