Join Free
  • Inbox
    + Reply to Thread
    Results 1 to 3 of 3
    1. #1

      Question Where can I get the Search Keyword?

      What variable do I use to get the query string?

    2. #2

    3. #3
      Thanks! I did figure it out I use this function

      PHP Code:
      <?php 
      function search_engine_query_string($url false) {
           
       if(!
      $url && !$url = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : false) {
              return 
      '';
              }
           
              
      $parts_url parse_url($url);
              
      $query = isset($parts_url['query']) ? $parts_url['query'] : (isset($parts_url['fragment']) ? $parts_url['fragment'] : '');
              if(!
      $query) {
                  return 
      '';
              }
              
      parse_str($query$parts_query);
              return isset(
      $parts_query['q']) ? $parts_query['q'] : (isset($parts_query['p']) ? $parts_query['p'] : '');
           
          }

    Posting Permissions

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