Detailed Description
Class provides search engines routine.
- Author
- Dodonov A.A.
Definition at line 26 of file search_engines.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 51 of file search_engines.php.
{
try
{
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
$this->Text =
get_package(
'string::text' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
Definition at line 82 of file search_engines.php.
{
try
{
$URL = '';
if( $this->Security->get_gp( 'referer' , 'raw' , '' ) != '' )
{
$URL = $this->Security->get_gp( 'referer' , 'raw' );
}
else
{
$URL = $this->Security->get_srv( 'HTTP_REFERER' , 'raw' , false );
}
return( $URL );
}
catch( Exception $e )
{
}
}
Function returns search engine name.
- Returns
- Search engine name, or false
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 178 of file search_engines.php.
{
try
{
{
return( false );
}
$Crawler = false;
$Crawler = $this->
test_crawler(
'google.' ,
'Google' , $Crawler );
$Crawler = $this->
test_crawler(
'yandex.' ,
'Yandex' , $Crawler );
$Crawler = $this->
test_crawler(
'qip.ru' ,
'Qip' , $Crawler );
$Crawler = $this->
test_crawler(
'mail.ru' ,
'Mail' , $Crawler );
$Crawler = $this->
test_crawler(
'rambler.ru' ,
'Rambler' , $Crawler );
$Crawler = $this->
test_crawler(
'bing.com' ,
'Bing' , $Crawler );
$Crawler = $this->
test_crawler(
'nigma.ru' ,
'Nigma' , $Crawler );
$Crawler = $this->
test_crawler(
'webalta.ru' ,
'Webalta' , $Crawler );
$Crawler = $this->
test_crawler(
'ukr.net' ,
'Ukr.net' , $Crawler );
$Crawler = $this->
test_crawler(
'conduit.com' ,
'Conduit' , $Crawler );
return( $Crawler );
}
catch( Exception $e )
{
}
}
Function return search query parametr.
- Returns
- Search query parameter.
- Exceptions
-
| Exception | Exception An exception of this type is thrown. |
- Author
- Додонов А.А.
Definition at line 226 of file search_engines.php.
{
try
{
$Search = false;
switch( $SearchEngine )
{
case( 'Google' ):
case( 'Webalta' ):
case( 'Mail' ):
case( 'Bing' ):
case( 'Conduit' ):
case( 'Ukr.net' ):$Search = 'q=';break;
case( 'Yandex' ):$Search = 'text=';break;
case( 'Qip' ):
case( 'Rambler' ):$Search = 'query=';break;
case( 'Nigma' ):$Search = 's=';break;
}
return( $Search );
}
catch( Exception $e )
{
}
}
Function returns search query.
- Returns
- search query, or false.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 278 of file search_engines.php.
{
try
{
if( $Search !== false )
{
$Phrase = urldecode( urldecode( $URL ) );
preg_match( "/[\?\&]{1}$Search([^\&\#]*)/" , "$Phrase&" , $Phrase2 );
return( isset( $Phrase2[ 1 ] ) ? $this->Text->iconv( false , 'utf-8' , $Phrase2[ 1 ] ) : false );
}
else
{
return( false );
}
}
catch( Exception $e )
{
}
}
| redirected_from_search_engine |
( |
| ) |
|
Function validates value of the function get_search_engine.
- Returns
- true if the user has come from the searche engine, false otherwise.
- Exceptions
-
| Exception | Exception An exception of this type is thrown. |
- Author
- Додонов А.А.
Definition at line 323 of file search_engines.php.
{
try
{
return( $Redir === false ? false : true );
}
catch( Exception $e )
{
}
}
| test_crawler |
( |
|
$CrawlerUrl, |
|
|
|
$CrawlerName, |
|
|
|
$Crawler |
|
) |
| |
Definition at line 135 of file search_engines.php.
{
try
{
if( $Crawler === false && stristr( $URL , $CrawlerUrl ) )
{
$Crawler = $CrawlerName;
}
return( $Crawler );
}
catch( Exception $e )
{
}
}
Field Documentation
The documentation for this class was generated from the following file: