phpSitemapNG data structure

The data structure internally used by phpSitemapNG is described on this page
All information for a url entry are stored in an array which can have the following entries:

phpSitemapNG internal data structure

Detailed explanation of the phpSitemapNG data structure

Only PSNG_URLINFO_URL is a must, the rest of the keys are optional. But the more an input plugin provides, the better.

PSNG_URLINFO_ENABLED

  • type: int
  • value: 0/1
  • description: the page will be used by output plugins(value: 1) or not(value: 0)

 

PSNG_URLINFO_URL

  • type: string
  • description: the url of the page

 

PSNG_URLINFO_LASTMOD

  • type: int
  • value: timestamp
  • description: last modification time of page (content)

 

PSNG_URLINFO_CHANGEFREQ

  • type: string
  • value: specified by Google Sitemaps protocol
  • description: the changefreq string introduced by Google Sitemaps

 

PSNG_URLINFO_PRIORITY

  • type: float
  • value: 0.0 to 1.0
  • description: the priority value introduced by Google Sitemaps

 

PSNG_URLINFO_FILENAME

  • type: string
  • value: absolute path to existing file
  • description: contains a valid absolute filename pointing to the page

 

PSNG_URLINFO_TYPE

  • type: string
  • value: valid content type
  • description: content type of url entry (eg application/pdf, application/html, ...)

 

PSNG_URLINFO_ADDED

  • type: int
  • value: timestamp
  • description: time when page has been added for the first time

 

PSNG_URLINFO_TITLE

  • type: string
  • description: the title of the website extraced from html content

 

PSNG_URLINFO_GROUP

  • type: string
  • description: represents a group that can be used by plugins to select groups of urls

 

PSNG_URLINFO_META_ROBOTS

  • type: string
  • description: contains the robots tag from html website

 

PSNG_URLINFO_PAGESIZE

  • type: int
  • description: contains pagesize in byte

 

PSNG_URLINFO_PAGEHASH

  • type: string
  • description: contains hash value of page content

 

Google Adsense