谷歌镜像 伍佰目录 短网址
  当前位置:海洋目录网 » 站长资讯 » 站长资讯 » 文章详细 订阅RssFeed

PHP - Manual: udm_get_res_field

来源:网络转载 浏览:43971次 时间:2024-02-26
udm_get_res_param » « udm_get_doc_count
  • PHP 手册
  • 函数参考
  • 搜索引擎扩展
  • mnoGoSearch
  • mnoGoSearch 函数

udm_get_res_field

(PHP 4 >= 4.0.5, PHP 5 < 5.1.0, PECL mnogosearch >= 1.0.0)

udm_get_res_field — Fetch a result field

说明

udm_get_res_field ( resource $res , int $row , int $field ) : string

Fetch a mnoGoSearch result field.

参数

res

res - a link to result identifier, received after call to udm_find().

row

row - the number of the link on the current page. May have values from 0 to UDM_PARAM_NUM_ROWS-1.

field

field - field identifier, may have the following values:

  • UDM_FIELD_URL - document URL field
  • UDM_FIELD_CONTENT - document Content-type field (for example, text/html).
  • UDM_FIELD_CATEGORY - document category field. Use udm_cat_path() to get full path to current category from the categories tree root. (This parameter is available only in PHP 4.0.6 or later).
  • UDM_FIELD_TITLE - document title field.
  • UDM_FIELD_KEYWORDS - document keywords field (from META KEYWORDS tag).
  • UDM_FIELD_DESC - document description field (from META DESCRIPTION tag).
  • UDM_FIELD_TEXT - document body text (the first couple of lines to give an idea of what the document is about).
  • UDM_FIELD_SIZE - document size.
  • UDM_FIELD_URLID - unique URL ID of the link.
  • UDM_FIELD_RATING - page rating (as calculated by mnoGoSearch).
  • UDM_FIELD_MODIFIED - last-modified field in unixtime format.
  • UDM_FIELD_ORDER - the number of the current document in set of found documents.
  • UDM_FIELD_CRC - document CRC.

返回值

udm_get_res_field() returns result field value on success, FALSE on error.

add a note

User Contributed Notes 4 notes

up down 0 kosh dot linux at gmail dot com10 years ago Use the function udm_get_res_field_ex() to fetch "non-standard" sections.

Example:

<?php
$tags = udm_get_res_field_ex($agent, $row, "meta.mytag");
?>
up down 0 ctg-php at graysmark dot net15 years ago It seems the description length is now determined by UDM_MAXDESCSIZE in udm_common.h instead of UDM_MAXTEXTSIZE up down 0 davidbullock at tech-center dot com17 years ago To further improve the "description" field quality, there are two additional techniques you can use. 

First, you can define this value if you know it, by setting a description meta tag in the head section.

Second, mnogosearch has an <index></noindex> tag pair that appears to make the enclosed content completely invisible to the search engine.  I've used this on the sites I maintain to 'vanish' the navigational elements, field names, and other non-content type HTML and page window dressing so that only the important content is indexed and reported on.

This last technique as an added (and more important benefit) of helping to eliminate a lot of false matches in searches.
up down 0 davidbullock at tech-center dot com17 years ago The returned page description is only 100 characters long.

To store more information, you can change the appropriate database field length to 255 characters (field "description" in the table "url"), and change the following line in udm_common.h.

#define UDM_MAXTEXTSIZE 255
add a note

官方地址:https://www.php.net/manual/en/function.udm-get-res-field.php

  推荐站点

  • At-lib分类目录At-lib分类目录

    At-lib网站分类目录汇集全国所有高质量网站,是中国权威的中文网站分类目录,给站长提供免费网址目录提交收录和推荐最新最全的优秀网站大全是名站导航之家

    www.at-lib.cn
  • 中国链接目录中国链接目录

    中国链接目录简称链接目录,是收录优秀网站和淘宝网店的网站分类目录,为您提供优质的网址导航服务,也是网店进行收录推广,站长免费推广网站、加快百度收录、增加友情链接和网站外链的平台。

    www.cnlink.org
  • 35目录网35目录网

    35目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向35目录推荐、提交优秀网站。

    www.35mulu.com
  • 就要爱网站目录就要爱网站目录

    就要爱网站目录,按主题和类别列出网站。所有提交的网站都经过人工审查,确保质量和无垃圾邮件的结果。

    www.912219.com
  • 伍佰目录伍佰目录

    伍佰网站目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向伍佰目录推荐、提交优秀网站。

    www.wbwb.net