I Choice Drupal to run open website directory and evaluate ( ranking ) system ,
It Launch on drupal 7 based .
I use framework theme and improved it ,
I use computed_field module to have custom function about evaluate system .

I still improving it to reach to my propose ,

See here : http://mywebvalue.com

Comments

oakulm’s picture

Tried it but got out of memory error :) I think you need some testing

alimosavi’s picture

Thank you for notify me , the issues for lot visitors and lot websites update .. ( i hope that i can solve it )

jdwalling’s picture

If you have a resource problem for anonymous users try the Boost module
http://drupal.org/project/boost
D7 is still in dev. I haven't tried it but the maintainer, mikeytown2, told me it was stable enough to use.

Other performance remedies
http://www.listology.com/jwalling/list/drupal-performance

alimosavi’s picture

Thank you , I transfer it to vps and run boost via nginx + php-fpm , the issues solved ....

myrigel’s picture

Hy alimosavi

how you extract the meta data (title, description and Keywords) from the submitted url? is there a module for?

(sry from my english)
have a nice day
rigel

alimosavi’s picture

hi , not hard , i use custom function not module .
drigg nearly can do this action too ..

myrigel’s picture

hy ali

i tried drigg a couplet times but never figure it out :(

can you show me your custom function? please :]

alimosavi’s picture

Ok , only for drupal members :)

You can use getUrlData function to get a url meta tags , for example :

$result = getUrlData("$url");
print $result['title'] ;
print $result['metaTags']['description']['value'] ;
print $result['metaTags']['keywords']['value'];

This code show you the contents of title & description & keywords meta tags of a website

here is the function :

function getUrlData($url)
{
    $result = false;
    $contents = getUrlContents($url);
   if (isset($contents) && is_string($contents))
    {
        $title = null;
        $metaTags = null;
       preg_match('/<title>([^>]*)<\/title>/si', $contents, $match );
       if (isset($match) && is_array($match) && count($match) > 0)
        {
            $title = strip_tags($match[1]);
        }
       preg_match_all('/<[\s]*meta[\s]*name="?' . '([^>"]*)"?[\s]*' .'[lang="]*[^>"]*["]*'.'[\s]*content="?([^>"]*)"?[\s]*[\/]?[\s]*>/si', $contents, $match);
        if (isset($match) && is_array($match) && count($match) == 3)
        {
            $originals = $match[0];
            $names = $match[1];
            $values = $match[2];
           if (count($originals) == count($names) && count($names) == count($values))
            {
                $metaTags = array();
               for ($i=0, $limiti=count($names); $i < $limiti; $i++)
                {
                    $metaname=strtolower($names[$i]);
                    $metaname=str_replace("'",'',$metaname);
                    $metaname=str_replace("/",'',$metaname);
                    $metaTags[$metaname] = array (
                    'html' => htmlentities($originals[$i]),
                    'value' => $values[$i]
                    );
                }
            }
        }
        if(sizeof($metaTags)==0) {
            preg_match_all('/<[\s]*meta[\s]*content="?' . '([^>"]*)"?[\s]*' .'[lang="]*[^>"]*["]*'.'[\s]*name="?([^>"]*)"?[\s]*[\/]?[\s]*>/si', $contents, $match);
           if (isset($match) && is_array($match) && count($match) == 3)
            {
                $originals = $match[0];
                $names = $match[2];
                $values = $match[1];
               if (count($originals) == count($names) && count($names) == count($values))
                {
                    $metaTags = array();
                   for ($i=0, $limiti=count($names); $i < $limiti; $i++)
                    {
                        $metaname=strtolower($names[$i]);
                        $metaname=str_replace("'",'',$metaname);
                        $metaname=str_replace("/",'',$metaname);
                        $metaTags[$metaname] = array (
                            'html' => htmlentities($originals[$i]),
                            'value' => $values[$i]
                        );
                    }
                }
            }
        }
       $result = array (
            'title' => $title,
            'metaTags' => $metaTags
        );
    }
   return $result;
}

function getUrlContents($url, $maximumRedirections = null, $currentRedirection = 0)
{
    $result = false;
    $contents = file_get_contents($url);
   if (isset($contents) && is_string($contents))
    {
        preg_match_all('/<[\s]*meta[\s]*http-equiv="?REFRESH"?' . '[\s]*content="?[0-9]*;[\s]*URL[\s]*=[\s]*([^>"]*)"?' . '[\s]*[\/]?[\s]*>/si', $contents, $match);
       if (isset($match) && is_array($match) && count($match) == 2 && count($match[1]) == 1)
        {
            if (!isset($maximumRedirections) || $currentRedirection < $maximumRedirections)
            {
                return getUrlContents($match[1][0], $maximumRedirections, ++$currentRedirection);
            }
           $result = false;
        }
        else
        {
            $result = $contents;
        }
    }
   return $contents;
}
myrigel’s picture

WOW awesome THX :D :D