witherwind
witherwind

Reputation: 472

How to achieve Google style of getting search results?

I typed this in Google:

<span class=""></span>

And on my URL, it returned:

q=<span+class%3D""><%2Fspan>&btnK=

It appears that it converted spaces, equals (=) sign, and backslashes into something.

Additionally, it didn't show anything different on the search box. Is this secure? If so, how do I achieve this?

Thank you people!

Upvotes: 0

Views: 36

Answers (1)

Ghost
Ghost

Reputation: 2226

https://www.php.net/urlencode

string urlencode ( string $str )

It depends on what you're trying to do, but urlencode will do something similar to google's search box.

Upvotes: 2

Related Questions