04-12-2005, 02:50 PM
I read everywhere including where I asked for an xml feed for this search. I finally broke down and took the time to build one.


I have almost zero coding skills I am a read, copy and paste guy. I just couldn't devote any of my programmers time to this project yet we needed XML output of our results.

Since These forums "time out" please if you find a character that I am not stripping out to keep the xml functioning let me know on my site. XML is delicate and truthfully there should just be a php function that says cleans everything but standard text and numbers from a variable.

PHPDIG often closes out forum posts and demands that new ones be created. So please if you have
Changes to these files or additions to what can be done to get cleaner XML Let me know at

Some places you may want to reference if your xml is not clean enough to parse.


Installation and Use. This was done on phpdig.net's 1.8.7 release 1.8.8rc1 was buggy.

To install is simple just upload the files we left them in directory structure fashion.

You need to modify your config file.

@ line 88

Delete your template information and copy this.

// template file and style - checks to see that template is set to a valid value
if (isset($_REQUEST['template_demo'])) { $template_demo = $_REQUEST['template_demo']; }
$templates_array = array('black.html','bluegrey.html','corporate.html','green.html','grey.html ','lightgreen.html','linear.html','newspaper.html','phpdig.html','simple.ht ml','terminal.html','yellow.html','gaagle.html');
if(isset($template_demo) && in_array($template_demo, $templates_array)) {
$template = "array";
} else {
$template = "$relative_script_path/templates/corporate.html";

You may want to change your fall back template where we have ours set to corporate.

I recommend these settings although not important
define('DISPLAY_SNIPPETS',false); //Display text snippets
define('DISPLAY_SNIPPETS_NUM',4); //Max snippets to display
define('DISPLAY_SUMMARY',true); //Display description

Turn OFF RSS this is a useless tool and only beats your harddrive up and sucks down bandwidth.

define('ALLOW_RSS_FEED',false); // Do RSS and display link - if true, set rss dir to 777
$theenc = PHPDIG_ENCODING; // needs to be same encoding used in index

////////////TO CALL YOUR XML FEED/////////


04-16-2005, 06:59 AM
Can't believe for all the whining for Xml no one seems excited about the ability to output their search to other sites.

04-21-2005, 10:56 PM
I still have some character that is breaking this once in a blue moon if someone else see's or finds it please let me know

05-19-2005, 01:29 AM
Am i right to percive that this little mod will allow PHPdig to search XMl documents?

05-19-2005, 09:27 AM
No digger will already do that just treats them like text files. It will not follow links that would simply be a matter of telling the crawler to acknowled the {link}{/link] the same as it would a href's

This Outputs your digger results in XML.

Doing it this way allows me to control the output and add our search engines Paid clicks to the system.


See this gives me Site search and paid listings combined together in a nice format. I am about to release this Site search standalone page which will allow Digger crawler guys to have Paid listings on their customers sites.

Once Results are in XML format its a simple matter of a Rss parser and an the users CSS Style sheet. The CSS style sheet controls what the data looks like at that point. This is better page optimization for other searches and cross browser compatible coding. Not to mention its just plain faster.