Đang Thực Hiện

JoMo PPC Plugin

I need a search plugin for 'JoMo Easy Pay-Per-Click Search Engine' ([url removed, login to view] ) that will retrieve search results from 'Google' and '[url removed, login to view]'.

I have enclosed a plugin for '[url removed, login to view]', as an example:




function init(){

global $dbObj;

$dbSet=new xxDataset($dbObj);

$table = "adminoptions";


INSERT INTO adminoptions VALUES ('maxAltavistaCount', '50', 'Altavista: max links', 'Search sites', 'string');

INSERT INTO adminoptions VALUES ('searchAltavista', '0', 'Altavista: enable', 'Search sites', 'yesno');


// check options

$cat = "Search sites";

if (!$this->isExistOption("searchAltavista"))

$this->insertOption(array("optionName"=>"searchAltavista","value"=>0,"description"=>"Altavista: enable","optionCategory"=>$cat,"optionType"=>"yesno"));

if (!$this->isExistOption("maxAltavistaCount"))

$this->insertOption(array("optionName"=>"maxAltavistaCount","value"=>0,"description"=>"Altavista: max links","optionCategory"=>$cat,"optionType"=>"string"));


function addPlugin(&$plugins){

$plugins[]=array("name"=>"ahha", "classname"=>"CSearch_Ahha");


function isEnable(){

$opt = getOption("searchAltavista");

if ($opt==1) return 1;

else return 0;


function getMaxCount(){

$maxCount = getOption("maxAltavistaCount");

return $maxCount;


function getLinks($str, $from ,$count, &$error){

//dprint("av find from $from, count=$count");

if ($this->isEnable()==0) return 0;

$maxCount = $this->getMaxCount();

$str = stripslashes($str);

if ($from > $maxCount)

return array("count"=>$from,"totalLinks"=>$maxCount, "links"=>array());

$count = $from + $count > $maxCount ? $maxCount-$from : $count;

$page1 = floor($from/10);

$page2 = floor(($from+$count-1)/10);

$start = $page1*10;

$found = 0; $total=0;

$index = 0;


for ($p=$page1; $pgetPart($str, $p*10, 10,$error);

if (empty($res)) break;

$found += $res["count"];

$total = $res["totalLinks"];

$links = array_merge($links, $res["links"]);


$links = array_slice($links, $from-$start,$count);

$found = sizeof($links);




return $result;


function getPart($str, $from, $count, &$error){

global $Error;

global $items, $index;

global $_count, $_startcount;

//dprint("avf: str=$str, from=$from");

$str = urlencode($str);

//$filename = "[url removed, login to view];.$str."&pg=q&avkw=qtrp&kl=XX&stq=$from";

$filename = "[url removed, login to view];.$str."&avkw=rf&stq=$from";

//$filename = "test_av1.htm";


$ff = @file($filename);


if (!$ff) {

return false;


$text = join('',$ff);

$items = array();

$text = preg_replace("/n|t|r/ims","",$text);

$text = preg_replace("/|/ims","",$text);

//$text = preg_replace("/|/ims","",$text);

$text = preg_replace("/|]*>/ims","",$text);

$text = preg_replace("//ims","",$text);

$text = preg_replace("/&nbsp/ims","",$text);

//echo $text;

$founds = array();

$pattern = "/";

// count

$pattern .= "altavista found +([0-9,]+) +resultss*(.*)";


$t = preg_match_all($pattern, $text, $founds);

if (!$t){ /*dprint("no matches 1");*/ return 0; }

$text = $founds[2][0];

$cs = $founds[1][0];

$avcount = preg_replace("/[s,]+/im","",$cs);


// dprint("text=".$text);

$pattern = "/";

$pattern .= "]*>s*()?s*]*)?s*href="([^">]*)"[^>]*>";

$pattern .= "([^]*)";

$pattern .= "([^]*]*>s*)?[^]*]*>([^]*)AV:results");

// print_r($founds);


$refs = $founds[3];

$titles = $founds[4];

$descrs = $founds[7];


//$linkAttributes = array('title','url','linkURL', 'description', 'bid');


for ($i=0;$i0, "url"=>$url, "linkURL"=>$url,

"title"=>$titles[$i], "description"=>$descrs[$i], "bid"=>0, "pluginName"=>$this->pluginName);

$items[] = $item;


$result["totalLinks"] = $avcount;

$result["count"] = $_count;

$result["links"] = $items;

$error = "";

return $result;



$search_plugins[]=array("name"=>"Altavista", "classname"=>"CSearch_Altavista", "object"=>new CSearch_Altavista);


$str = "business";

$from = 0;


$error = "";

$links = parseLinks_altavista($str, $from, $error);

echo "$error";



Best Regards


Kĩ năng: PHP, XML

Xem nhiều hơn: ppc plugin, jomo easy pay per click, plugins search web ppc, value options, text string search, str pattern, string pattern, string find c, search text string, q find, php pg, pattern string, index php pg php, index php cat, global p, c string pattern, c sizeof string, business name search engine, break com, altavista search engine, ppc plugins, jomo ppc, cool ppc plugins, pay p, max p

Về Bên Thuê:
( 5 nhận xét ) chichester, United Kingdom

ID dự án: #5038

Được trao cho:


Hello, Stuart. Please see PM for details on our bid. Regards.

$60 USD trong 2 ngày
(4 Đánh Giá)