View Full Version : about the url

11-18-2007, 10:25 AM
i'd like to ask you a question.

in the page of the "http://www.google.com.au", i typed a word into search function,
then it bring to a page with a link of the "http://www.google.com.au/search?hl=en&q=java&btnG=Google+Search&meta="

Could anyone tell me how i can create a link like the "http://www.google.com.au/search?hl=en&q=java&btnG=Google+Search&meta="

11-18-2007, 12:05 PM
All it really is is passing variables through the url.

$hl = $_GET['hl'];
$q = $_GET['q'];
$btnG = $_GET['btnG'];

echo "$hl $q $btnG";
// prints "en java Google+Search"

It's just a convenient way of passing stuff from one page to another. Nothing "special" about it.

The whole "http://www.google.com.au/search?" bit, with out the extension is done with the RewriteRule in .htaccess. Someone can probable elaborate on it more though.

11-19-2007, 10:24 AM
Thanks a lot