/**
 *  @todo make it work lazy bum!
 */
function YahooAnswers($page)
{
    $url = 'http://answers.yahoo.com/search/search_result?page=1&p=%s&scope=all&fltr=_en&question_status=all&date_submitted=all&category=0&answer_count=any&filter_search=1';
    $data = Internet::Grab(sprintf($url, str_replace(' ', '+', $page->keyword)));
    preg_match_all('/h3><a.+?"(.+?)<ul/', $data, $qa);
    // $gContent = preg_replace("/(<\/?)(\w+)([^>]*>)/e"," ",$gContent);
}
Ejemplo n.º 2
0
 function GetImage($keyword)
 {
     $keyword = str_replace(" ", "+", $keyword);
     $content = Internet::Grab(sprintf("http://images.search.yahoo.com/search/images?p=%s&ei=UTF-8", $keyword));
     if (preg_match_all("/thumbnail\\.aspx\\?q=(.+?)\"/", $content, $matches) == 0) {
         shuffle($matches[1]);
     }
     return Internet::Grab(sprintf("http://ts3.mm.bing.net/images/thumbnail.aspx?q=%s", str_replace("&amp;", "&", $matches[1][0])));
 }
Ejemplo n.º 3
0
 function EnrichContent($content, $keyword, $args)
 {
     $url = sprintf("http://www.google.com/search?hl=en&source=hp&q=%s&aq=f&aqi=&aql=&oq=&gs_rfai=&num=100", str_replace(" ", "+", $keyword));
     preg_match_all("/class=l>(.+?)<span class=f><cite>/si", Internet::Grab($url), $cmatches);
     $gContent = implode(" ", $cmatches[1]);
     $gContent = preg_replace("/(<\\/?)(\\w+)([^>]*>)/e", " ", $gContent);
     $content .= $gContent;
     return $content;
 }
Ejemplo n.º 4
0
 function EnrichContent($content, $keyword, $args)
 {
     $kw = str_replace(" ", "+", $keyword);
     $url = sprintf("http://www.bing.com/search?q=%s+language:en&go=&form=QBRE&filt=all", $kw);
     preg_match_all("/<h3><a (.+?)<\\/p/si", Internet::Grab($url), $cmatches);
     $gContent = implode(" ", $cmatches[1]);
     $gContent = preg_replace("/(<\\/?)(\\w+)([^>]*>)/e", " ", $gContent);
     $content .= $gContent;
     return $content;
 }
Ejemplo n.º 5
0
 function GetImage($keyword)
 {
     $keyword = str_replace(" ", "+", $keyword);
     $content = Internet::Grab("http://www.sxc.hu/browse.phtml?f=search&txt={$keyword}&w=1&x=0&y=0");
     if (preg_match_all("/showtrail\\(300,[0-9]+,'(.+?)'/", $content, $matches) == 0) {
         $keyword = str_replace(" ", "-", $keyword);
         $content = Internet::Grab("http://www.sxc.hu/browse.phtml?f=search&txt={$keyword}&w=1&x=0&y=0");
         if (preg_match_all("/showtrail\\(300,[0-9]+,'(.+?)'/", $content, $matches) == 0) {
             return null;
         }
     }
     shuffle($matches[1]);
     return Internet::Grab(sprintf("http://www.sxc.hu/%s", $matches[1][0]));
 }
Ejemplo n.º 6
0
 function EnrichContent($content, $keyword, $args)
 {
     $feeder = array('http://news.search.yahoo.com/rss?ei=UTF-8&p=%s&fr=sfp', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&q=%s&ie=utf-8&num=10&output=rss', 'http://www.bing.com/search?q=%s+language:en&go=&form=QBLH&filt=all&format=rss');
     shuffle($feeder);
     $link = sprintf($feeder[0], str_replace(' ', '+', $keyword));
     $feed = Internet::Grab($link);
     preg_match_all('/<description>(.+?)<\\/description>/si', $feed, $des);
     preg_match_all('/<title>(.+?)<\\/title>/si', $feed, $tit);
     $retArr = array_merge($tit[1], $des[1]);
     if (count($retArr) == 0 || !is_array($retArr)) {
         return $content;
     }
     shuffle($retArr);
     $ret = sprintf('%s %s', $content, implode(' ', $retArr));
     return $ret;
 }
Ejemplo n.º 7
0
 function EnrichContent($content, $keyword, $args)
 {
     $ArticleDashboards = array('http://www.afroarticles.com/article-dashboard/indexser.php?search=%s', 'http://www.keywordarticles.org/indexser.php?search=%s', 'http://www.purearticle.com/indexser.php?search=%s', 'http://www.upublish.info/indexser.php?search=%s');
     shuffle($ArticleDashboards);
     $url = sprintf($ArticleDashboards[0], str_replace(" ", "+", $keyword));
     preg_match_all("/<li><a href=\"(.+?)\"/", Internet::Grab($url), $umatches);
     if (count($umatches[1]) == 0) {
         return $content;
     }
     shuffle($umatches[1]);
     preg_match_all("/<p class=\"articletext\">(.+?)<\\/p/", Internet::Grab($umatches[1][0]), $cmatches);
     foreach ($cmatches[1] as $c) {
         if (strlen($c) >= 1000) {
             $adContent .= $c;
             break;
         }
     }
     $adContent = preg_replace("/(<\\/?)(\\w+)([^>]*>)/e", "", $adContent);
     $content .= $adContent;
     return $content;
 }