Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: about the url

  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    306
    Thanks
    24
    Thanked 0 Times in 0 Posts

    about the url

    Hi;
    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="
    Last edited by kamkam; 11-18-2007 at 09:41 AM.

  • #2
    Regular Coder
    Join Date
    Nov 2006
    Posts
    246
    Thanks
    13
    Thanked 26 Times in 24 Posts
    All it really is is passing variables through the url.

    PHP Code:
    <?php
    $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.

  • #3
    Regular Coder
    Join Date
    Dec 2006
    Posts
    306
    Thanks
    24
    Thanked 0 Times in 0 Posts
    Thanks a lot


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •