PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Help with identifying User Agent string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with identifying User Agent string

    Hi,

    I cannot seem to identify the Zoom 6 spider in my PHP pages. I am trying to install it on a WordPress site where the default article title is Blog Name >> Article title (concatenated). This has been picked up by search engines over the past 3 years so I am loathe to change it now, even if I should have done it from day 1 in hindsight.

    I want my site search results to contain just the Article Title without the Blog Name and ">>" prefix, so I want to feed the Zoom spider just the title.

    This code does not seem to work for me. I am using the User Agent string specified in the .pdf manual. The HTTP_USER_AGENT value does work on my server, in tests from my browser as it returns "Mozilla . . . ."
    Any ideas?

    PHP Code:
    <title>
        <?php
            $theAgent 
    $_SERVER["HTTP_USER_AGENT"];
            
    $ZoomUserAgent "ZoomSpider - wrensoft.com[ZSEBOT]";
            if (
    $theAgent==$ZoomUserAgent)
                {
                 
    wp_title();
                 }
            else
                {
                
    bloginfo('name');
                
    wp_title();
                }
        
    ?>
    </title>
    This is the default code in the standard WordPress header.php script
    PHP Code:
    <title>
    <?php bloginfo('name'); ?>
    <?php wp_title
    (); ?>
    </title>
    I am not a PHP coder, so maybe I have introduced a bug or used incorrect syntax?

  • #2
    Originally posted by Danny View Post
    PHP Code:
    <title>
        <?php
            $theAgent 
    $_SERVER["HTTP_USER_AGENT"];
            
    $ZoomUserAgent "ZoomSpider - wrensoft.com[ZSEBOT]";
            if (
    $theAgent==$ZoomUserAgent)
    ...
    That line of code means you need an exact match between the two strings. Your Zoom User-Agent string is actually missing a space character before "[ZSEBOT]" that is, it should be this:

    PHP Code:
            $ZoomUserAgent "ZoomSpider - wrensoft.com [ZSEBOT]"
    We just noticed that the support page which describes this has an unfortunate line wrap right at that spot so the spacing is not obvious. We'll fix that up so it's clearer.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      You might find that you are better off doing a sub-string match just on the [ZSEBOT] part of the string.

      Comment


      • #4
        Thanks for the rapid response, guys. I will get back to you with the results.

        Comment

        Working...
        X