stargeek
PHP news website logo.
home    PHP scripts    articles    seo tools    links    search    contact    shop    realtors


Querystring Hacking with PHP







Querystring Hacking with PHP

Querystring Hacking with PHP 06/05/2005 11:46 PM

PHP and Standards: arg_separator.output: A few months ago, I went ballistic on querystring arguments. I rambled on about how I hate them and go to ridiculous lengths to avoid them. I think I'm somewhat insane in this respect.

Well, I found out today that PHP can be set to parse the querystring differently using the "arg_separator.input" ini setting. You could have it use semi-colons or whatever, and it would correctly parse the querystring into the $_GET array.

However, I can't see a setting to change the key/value separator, which must have to stay the equals sign. Anyone else know how to change that...you know, just so we can make our apps completely non-standard?




This is a GrokNews Entry: (what is grok?)





Similar Items

Querystring Hacking with PHP

Grok Headline matches for Querystring Hacking with PHP

My Querystring Argument Neurosis


My Querystring Argument Neurosis 03/22/2005 04:32 PM

I have a serious Web development neurosis: I hate querystring arguments. You know the garbage after the page name in a URL? Like this:

page.php?thisArgument=thisValue&andThisArgument=thisValue

I hate them. I think they're ugly, unweidly, and expose too much of your application to the world. This is an utterly irrational thing, I know, because querystring arguments work perfectly well. I just need to get over myself.

But is the querystring argument falling out of fashion? A lot of apps now run all requests through a single page, and they grab and parse the URL themselves. For instance:

/products/hunting_gear/1

This would show page 1 of products in the hunting gear category. There is no "products" or "hunting_gear" folder or file named simply "1." Instead, this URL is mapped to an actual block of code. You can do this with a RewriteRule pretty easily (you could do it with a PHP auto-prepend file too).

In my PHP apps, I use an AliasMatch rule to route everything to a single page and I have a mapper like this:

/product/[0-9]+/edit = edit_product.php

This uses a regular expression to map a URL pattern to a file. If the first "directory" is "product," the second is a number of some kind, and the third is "edit," then send them to the page to edit a product. That page will grab the number out of the URL and use it to load an object.

J2EE does this too, to map URL strings to servlets (I forget what the file is called..."web.config," maybe?). I have no doubt that .Net has the same functionality in there somewhere. I think Rails does this too, from what Joe tells me.

Using the A cceptPathInfo directive for Apache, you can do things like this:

index.php/this/is/some/extra/info

But that just looks sloppy to me. I don't know why. eZ publish does this by default, and it bugs me to no end.

Finally, today I found this, and it's what prompted me to write this little diatribe:

/messages.cfm/forumid:4/threadid:39092

So they're using AcceptPathInfo, but each "directory stop" along the way is a key-value pair. I like this. It speaks to the aesthetic in me, or to the neurotic, depending on how you look at it.

This last example perhaps proves that it's just the syntax I don't like — all those &'s and ='s floating around are like fingernails on a blackboard to me. This example is key-value just like traditional querystring arguments, so the function is the same, just the syntax is different. The colon-slash syntax just looks cleaner to me.

Am I the only one with this problem? Does anyone else hate querystring arguments as much as me?


Parsing a Querystring With Perl


Parsing a Querystring With Perl 12/19/2002 07:40 PM
Stickysauce Dec 19 2002 6:46PM ET

Car hacking


Car hacking 12/19/2004 03:40 PM
Race for the Ultimate Car Hacks By Michelle Deli People have been tinkering with their cars since the first horseless buggy hit the road. Now, thanks to onboard computerized systems that control everything from engine management systems to radios, hackers can customize their rides in ways that are likely to have Henry Ford doing back flips in his grave. Feeding this need for speed with aftermarket computer chips and simple upgraded components gneerates $25 million…

Direct and Related Links for 'Car hacking'


Hacking Mac OS X


Hacking Mac OS X 03/28/2005 03:16 PM

Who's hacking who?


Who's hacking who? 07/11/2004 06:20 PM
Macleans Online Jul 11 2004 9:28PM GMT

GIF Hacking


GIF Hacking 09/08/2004 12:27 PM

Common knowledge says that modifying a compressed image is a bad idea. Not always, though.


Features: Hacking XML


Features: Hacking XML 09/15/2004 07:42 PM
Among author Mike Fitzgerald's favorite hacks in XML Hacks are two that use SP, James Clark's free, open-source SGML-parser package. The first hack shows how to convert a minimally tagged document to well-formed XML. The second shows how to convert a Wiki format to XML via SGML and SP tools.

Hardware Hacking In The WSJ


Hardware Hacking In The WSJ 09/08/2004 10:35 AM

Hacking Crusoe


Hacking Crusoe 02/10/2004 02:44 AM
RWT is running an serious of articles by an anonymous author who has done an impressive job of reverse engineering many of the technical details of Transmeta's Code Morphine Software and the VLIW hardware at the core of Crusoe.

Hacking An Election


Hacking An Election 02/10/2004 02:41 AM
Nothing particularly new here if you've been following the whole issue on problems with electronic voting machines, but Salon has a fairly comprehensive piece describing the concerns of those who want to stop current voting machines from being used in elections. It describes some of the not-quite-so-secure techniques Diebold used to "secure" their machines - including leaving the necessary password out in the open. It also talks about how comments in the source code of the Diebold machines make it clear that the engineers knew that parts of the software don't work, and yet it was still used in elections. The responses from those who defend the electronic voting systems are a bit scary, as they basically ignore the point. Instead, they talk about how other voting methods have problems as well, and how difficult or expensive it would be to fix these voting machines. Whoever said democracy was supposed to be cheap? Update: Whoops. A new report says electronic voting machines in North Carolina lost 436 ballots last year.

Wi-Fi hacking, a primer


Wi-Fi hacking, a primer 08/13/2004 09:18 AM

Hacking the MuVo2


Hacking the MuVo2 01/22/2004 03:24 PM
A reader points us towards an interesting hack involving Creative's new 4GB MuVo2 MP3 player. It seems that it's 4GB MicroDrive isn't soldered to the...

Hacking Reality


Hacking Reality 01/16/2004 10:59 AM
"Reality is merely an illusion, albeit a very persistent one." --Albert Einstein

Hacking the planet


Hacking the planet 08/05/2004 02:23 PM

Hacking Text


Hacking Text 05/10/2004 04:21 PM

CNET posts an inter esting New York Times article about a group of European researchers who have found ways to 'un-black' blacked out text in documents like those released by the government in recent months by using a process-of-elimination technique to figure out what words fit under the obscured area.

The researchers showed their software at the conference, called Eurocrypt, by analyzing a presidential briefing memorandum released in April to the commission investigating the Sept. 11 attacks. After analyzing the document, they said they had high confidence the word "Egyptian" had been blacked out in a passage describing the source of an intelligence report stating that Osama Bin Ladin was planning an attack in the United States.

Via BoingBoing.

Click here to comment on this entry


Hardware Hacking


Hardware Hacking 04/23/2004 01:31 PM

Embracing the Art of Hacking


Embracing the Art of Hacking 05/19/2004 04:42 AM
If you can avoid some of the tedious bits, Paul Graham has some good points to make about the relationship between art and coding. Michelle Delio reviews Hackers and Painters.

Hacking Idol


Hacking Idol 05/17/2004 02:54 PM

It's great to finally hear someone talk about phone phreaking and other attempts to subvert American Idol voting. Just last week I was trolling the web looking for web-to-SMS gateways to see if one could write a bot to vote-spam an American Idol contestant. To hear that folks are using automated dialers to shut out voters seems even more obvious. They should probably just make the voting a 900 number, at say, 50 cents a vote, in order to limit hackery but people could still simply jam the lines with DoS attacks using dialers.


- Law Against Internet Hacking


- Law Against Internet Hacking 08/30/2004 08:01 AM
Hankooki Aug 30 2004 12:28PM GMT

Hacking the RoboSapien


Hacking the RoboSapien 09/19/2004 02:15 AM

Is Hacking Ethical


Is Hacking Ethical 05/13/2004 09:40 AM

Google hacking


Google hacking 02/15/2004 11:32 PM
Information Highways Feb 16 2004 3:47AM GMT

""Hacking" Revisited"


""Hacking" Revisited" 02/13/2004 02:37 PM

No medals for hacking


No medals for hacking 08/22/2004 11:17 PM
USA Today Aug 23 2004 3:14AM GMT

Law Against Internet Hacking


Law Against Internet Hacking 08/30/2004 08:01 AM
Hankooki Aug 30 2004 12:08PM GMT

Hacking Away At Apple


Hacking Away At Apple 03/26/2005 10:22 PM

Apple has traditionally been regarded as partially immune to the exploits of hackers and virus writers, thanks to its low market share -- but those days may be over. By Steven Musil, CNET News.com


Hacking the Hotel TV


Hacking the Hotel TV 09/24/2004 05:40 PM
How to get your video from their TV

Hacking: A history


Hacking: A history 04/12/2005 03:46 AM
News.bbc.co.uk - Mon Apr 11, 08:41 am GMT

Man charged with hacking


Man charged with hacking 07/23/2004 11:35 AM
globetechnology.com Jul 23 2004 3:26PM GMT

Hacking your Car Stereo


Hacking your Car Stereo 06/17/2005 06:10 PM

16.jpgiPod enthusiast Matt Gilbert has thrown together a nice, cost-efficient hack to get the iPod running directly to a car stereo without having an auxiliary input. He had experienced static and interference when using FM Transmitters or cassette adapters, and this tweak uses a toggle switch and some wire splicing to create a direct line-in into any car stereo.

The total cost of the mod is under $1 (if you already have basic wiring tools and supplies), and it's a great way to ruin your dashboard if you mess up.

Car Stereo Auxiliary Input [MattGilbert]


Hacking Quartz


Hacking Quartz 07/06/2004 03:19 PM

Social Hacking


Social Hacking 06/05/2005 10:46 PM
While I'm really glad that smart people like Tim O'Reilly and Chris Anderson are enjoying t-shirt media hack, I'm realizing that the really terrifying thing is that everybody in my social circle knows what Goatse is. But Tim's right, of course. The only thing bloggers love as much as a...

Hacking Explained


Hacking Explained 12/30/2003 01:29 AM

Hacking Mac OS X Panther


Hacking Mac OS X Panther 07/03/2004 10:01 AM
Rael Dornfest, coauthor of Mac OS X Panther Hacks, has selected these three hacks from the book for your sampling pleasure. The first two detail how to find anyone in your Address Book who has an Amazon Wish List, and how to build a GUI to your Unix scripts with a bit of Perl or Python; the third is just for fun. Enjoy. By Rael Dornfest, O'Reilly Network (via MyAppleMenu)

More Roomba hacking


More Roomba hacking 07/14/2004 10:00 AM
img_1514 Another group of hardware hackers have at a Roomba robotic vacuum cleaner:
"For higher level control, we've attached a Virgin Webplayer. The Webplayer was sold as a loss leader for Virgin's internet service in the late 90s, and thus can be found on ebay for under $100. It has two serial ports, a 200MHz Geode processor, 64M ram, and a miniPCI port. Thus, we can give it an 802.11b card, a webcam, and a usb-serial adapter."
Link (via MetaFilter)

Lowering the bar for hacking


Lowering the bar for hacking 03/19/2003 10:25 PM
Information related to 55,200 social security numbers were "stolen" from the University of Texas, and the "hacker" has turned himself in.  His crime?  Scanning ~2.7 million social security numbers through a web interface.  Obviously there are some security concerns here.

Hacking Your GPS Firmware


Hacking Your GPS Firmware 04/01/2005 11:21 AM

Hacking matter


Hacking matter 06/24/2004 06:41 AM
I've been reading Wil McCarthy's book Hacking Matter, which is a popularized version of the serious study of quantum dots and the ability to build pseudomatter using artificial atoms. How can one not like a book, which contains wonderful sentences such as this one:

Now we can create not only a thin film of goldlike pseudomatter, but a three-dimensional solid with pseudogold dopant atoms on the inside as well. Thus, we can generate a bulk material with the mass of wickered silicon, but the physical, chemical, and electrical properties of an otherwise-impossible gold/silicon alloy.

I mean - even the minuscule thought of it is breathtaking! The wonders of the universe! How could one not love this world, when so many incredible things are about? This could, and would change the face of the world as we know it. You just flick a switch, and you can make a part of the wall transparent - or a light source - or a TV screen - or gold. Whatever pleases you.

As an aside, I also found another very interesting paragraph (among thousands, but this one has an ominous look):

At his insistence, we filed an application with the United States Patent and Trademark Office, and within a few weeks we'd been contacted by the U.S. Air Force about the possibility of maybe licensing it.

Note that even in the US, patents are generally considered secret and proprietary, until a year of the filing date has passed. This is so that the application can be amended, fixed, and just being kept secret from the competitors, who might find a way to redesign around the actual implementation (ideas are not patentable as such). Obviously, the military is ignoring all that and have their own informants within the US patent process... Somehow, that does not surprise me at all.


Hacking, downloading and bad web design


Hacking, downloading and bad web design 07/20/2004 08:02 AM
Letters Very 21st century offences
Grok Description matches for Querystring Hacking with PHP
GrokA matches for Querystring Hacking with PHP

Opera Browser Address Bar Spoofing
Vulnerability


Opera Browser Address Bar Spoofing
Vulnerability
07/11/2004 09:20 AM
“Description: bitlance winter has discovered a vulnerability in the Opera browser, which potentially can be exploited by malicious people to conduct phishing attacks against a user. The problem is that information in the address bar is changed before properly loading a page. This can e.g. be exploited via a specially crafted HTML document…Solution: Disable support for Javascript. Input the URL to trusted sites directly in the address bar and don’t follow links from untrusted sources.”

A few useful tips for setting up a
LinkStation


A few useful tips for setting up a
LinkStation
08/17/2004 10:58 AM
This may be a no brainer for advanced types, but since I found no succinct help on this otherwise, here you go. I recently struggled with setting up a BuffaloTech LinkStation on my home network, which consists of a DSL modem ...

Screenscraping the Senate


Screenscraping the Senate 09/16/2004 11:14 AM
Screenscraping the Senate by Paul Ford
http://w ww.xml.com/pub/a/2004/09/01/hack-congress.html

In this inaugural article of Paul Ford's new column, Hacking Congress, he introduces his plan to create an RDF description of the U.S. federal government. He starts by collecting data on U.S. Senators and converting it to RDF. Future columns will focus on the House of Representatives and the Executive branch. This has been added to my Web Data Extractors white paper.

XML.com: Screenscraping the Senate


XML.com: Screenscraping the Senate 09/03/2004 04:41 AM
Paul Ford is going to "collect as much data on the U.S. government as [he can], convert it to RDF, and build a site and a web service that make it possible to explore that data" .. how to create an XML file of biographical information about U.S. Senators

xml.com/pub/a/2004/09/01/hack-congress.html
track this site | 4 links


Hacking Congress: Screenscraping the
Senate


Hacking Congress: Screenscraping the
Senate
09/01/2004 05:33 PM
In Paul Ford's first Hacking Congress column, he shows us how to turn information on the U.S. Senate site into RDF.

Change address formats in Address Book


Change address formats in Address Book 02/05/2005 10:14 PM
OK, this is picky of me, but I got fed up having a line for "County" in my UK-format addresses in AddressBook. It irked me. After a brief hunt, I found that I can modify the address format for each country's addresses by modi...

Browser Wars : Wells Fargo Bans Opera
Browser


Browser Wars : Wells Fargo Bans Opera
Browser
02/05/2005 09:42 PM
As of 8am today - Wells Fargo (one of the largest Banks in the United States) began blocking Opera browser from it's online banking.

MIME-Explode-0.32


MIME-Explode-0.32 05/22/2004 04:57 PM

MIME-Explode-0.34


MIME-Explode-0.34 05/25/2004 05:55 PM

MIME-Explode-0.31


MIME-Explode-0.31 05/06/2004 05:41 PM

MIME-Explode-0.35


MIME-Explode-0.35 05/28/2004 04:51 PM

MIME-Explode-0.28


MIME-Explode-0.28 11/04/2003 06:04 PM

MIME-Explode-0.36


MIME-Explode-0.36 07/31/2004 10:43 AM

MIME-Explode-0.33


MIME-Explode-0.33 05/25/2004 10:27 AM

Wireless set to explode


Wireless set to explode 06/12/2004 01:37 AM
Sunday Times South Africa Jun 12 2004 5:19AM GMT

J.Lo-Butt Implants Explode!


J.Lo-Butt Implants Explode! 07/29/2004 11:47 AM

Direct and Related Links for 'J.Lo-Butt Implants Explode!'

“…Candy Jones- Davies, 22, vows to sue the hospital where surgeons allegedly pumped the implants so full of curve-creating air, they both blew sky-high — right on the operating table. And she says a surgical nurse has agreed to testify in her attempt to collect $17.5 million for medical expenses, lost future wages and emotional pain and suffering. “She told me they had just put in the implants, when one of the surgeons — she’s…

PHP: Break apart strings with explode


PHP: Break apart strings with explode 09/21/2004 03:14 AM
Tech-Recipes Sep 21 2004 7:09AM GMT

PHP: Break apart string with explode


PHP: Break apart string with explode 09/19/2004 11:09 PM
Tech-Recipes Sep 20 2004 3:14AM GMT

The browser is dead! Long live the
browser!


The browser is dead! Long live the
browser!
01/02/2004 07:26 PM

Chinese 3G market to explode in 2007 -
LG ERI


Chinese 3G market to explode in 2007 -
LG ERI
08/23/2004 08:10 AM
Telecoms Korea Aug 23 2004 12:29PM GMT

Study: MP3 player market to explode


Study: MP3 player market to explode 09/21/2004 02:19 PM
IDC says there's tough competition ahead for the iPod as manufacturers launch rival portable jukeboxes.

Boats Explode Near Iraqi Oil Platform
(AP)


Boats Explode Near Iraqi Oil Platform
(AP)
04/24/2004 02:27 PM
AP - Three boats exploded near an Iraqi oil platform and two oil tankers off the Persian Gulf coast on Saturday evening, a British military spokesman said, in what appeared to be coordinated suicide attacks.

Are You Ready to Explode Your Keyword
Lists?


Are You Ready to Explode Your Keyword
Lists?
08/27/2004 01:57 PM
According to Amit Singhal, principal scientist at Google, over 50 percent of the 200 million searches performed a day have never been searched before. Now a new software program called Keyword Tumbler takes your existing keyword phrase and generates multiple variations of it, simply by mixing the keywords around. [PRWEB Aug 27, 2004]

Online media services set to explode


Online media services set to explode 07/14/2004 08:25 AM
The emerging online media services market -- which allows broadband consumers to legally obtain music and video over the Internet -- is set to generate nearly US$7 billion in revenues by 2008, according to Online Media Services: Forecasts, Business Models and Analysis, newly published by Digital Tech Consulting (DTC)...

N Korean trains explode in crash


N Korean trains explode in crash 04/22/2004 09:23 PM
Overseas officials confirm a massive blast feared to have killed and injured thousands, but North Korea stays silent.

Stored Bullets Explode in Wis. Oven (AP)


Stored Bullets Explode in Wis. Oven (AP) 02/18/2004 05:22 PM
AP - A man and his wife ducked behind a refrigerator when bullets began exploding in their oven, authorities say.

"bl0g readership is continuing to
explode"


"bl0g readership is continuing to
explode"
01/05/2005 04:21 AM

Nokia: Original batteries don't explode


Nokia: Original batteries don't explode 11/18/2003 03:19 PM
The Finnish company cites a study that shows that earlier research on its "exploding" phones was based on samples that included counterfeit batteries.

Two bombs explode in north Spain


Two bombs explode in north Spain 08/07/2004 01:31 PM
Bombs explode in two towns in Spain, after warnings from a caller claiming to represent Basque separatist group, Eta.

Report: Trains Explode in North Korea
(AP)


Report: Trains Explode in North Korea
(AP)
04/22/2004 10:42 AM
AP - North Korea declared a state of emergency after as many as 3,000 people were killed or injured Thursday when two trains carrying oil and liquefied petroleum gas collided and exploded at a station near the Chinese border, South Korean media reported.

Querystring Hacking with PHP

The following phrases have been identified by the grok system as matching this entry: "browser address" linkstation screenscraping php explode

















Also check out:


Grok

Ipod Porn on the
Rise

Brief Abstract of
Wikipedia's
Mesothelioma Cancer
page

Get first aid
instructions in your
cell phone

IE is crap
JSPWiki gains
podcasting support

Mashup: Movable Type
and WordML

Snow Screw?
X2 Technology
Demonstrator
Helicopter

Windows Starter
Edition Limitations

Custom Car Emblems
Google Sight Seeing
Transmeta to Shut
Down?

Teaming Essays
Exorcism
Lost in Space
Bogarting LAMP
Open Office Wars,
Part 6

'Bad' odours cause
bad driving - survey
(Reuters)

Constable Accused of
Trying to Knee
Deputy (AP)

Gene change alters
sex orientation in
fruit flies
(Reuters)

Prisoner in Jam With
Pot PB&J Sandwich
(AP)

Home of Dublin crime
boss to go under the
hammer (Reuters)

'Pig-Ball' Soccer
Match Staged in
Russia (AP)

Tiny publisher beats
giants on prize
shortlist (Reuters)

Octogenarian Nabbed
in Prostitution Ring
(AP)

Most Wanted: Work
for Japan's prison
inmates (Reuters)

High-End Cars Pulled
Over in Run to Vegas
(AP)

Elderly couple leads
police on merry hunt
(Reuters)

Bible-belt town bans
blasphemy (Reuters)

Porn sites to get
their own Internet
domain (Reuters)

Beached whales head
back out to sea
(Reuters)

Animal rights
activists face trial
under terror law
(Reuters)

Prosecutors ponder
violent sportsmen
(Reuters)

'Bad' odors cause
bad driving?
(Reuters)

'Hey! Isn't that Dad
up on that
billboard?'
(Reuters)

Police 'free' S&M
sex slave from car
trunk (Reuters)

Man ordered to pay
for healing ritual
(Reuters)

Hot Topics in
TidBITS
Talk/23-May-05

Bringing Order to
NYC Chaos: Garmin
StreetPilot c330

Burning Disc Labels
with LightScribe

Apple Releases
10.4.1 Hot on the
Heels of Tiger

DealBITS Drawing:
PublicVPN Winners

Qualcomm
Acknowledges Eudora
Bug

Fetch 5 Ready for a
Walk

Apple Recalls Laptop
Batteries

Next Issue Appears
06-Jun-05

Referendum for
Israel Online Vote

Children becoming
Internet-savvy
earlier on

Study: More young
children going
online

Rogue diallers
Internet wake-up
call

An Internet resource
for fighting
mortgage fraud

Hacker steals 50,000
dollars from woman's
online bank account

Internet is child's
play for more
youngsters

Now I know my
Internet: More
preschool kids
online

Kid assaults
circulating on
Internet

what is grok?