Home Resources Forum Advertise Contact

Go Back   Webmaster Forums > Internet Marketing, Business Online and E-Commerce > Techniques on Site Promotions > Link Development

Link Development Let's talk about link development, one of the most powerful promotion tools for your website.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 13th November 2006, 04:26 PM
tino2099 tino2099 is offline
WD Newbie
 
Join Date: 13th November 2006
Posts: 13
Default Code for meta crawler!

if you are thinking of putting up an "link exchage" page in your site it will be nice if you'll know if they did exchange your link...

<?php

function check_reciprocal($url,$title)
{


$contents = getUrlContents($url);

if (isset($contents) && is_string($contents))
{
if(preg_match("/\b".$title."\b/", $contents))
{
return true;
}
else return false;
}

}


function getUrlContents($url, $maximumRedirections = null, $currentRedirection = 0)
{
$result = false;

$contents = @file_get_contents($url);

// Check if we need to go somewhere else

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;
}
?>
this code will come in handy.......!!!!!!
Reply With Quote
  #2 (permalink)  
Old 15th November 2006, 01:27 AM
francisho francisho is offline
WD Newbie
 
Join Date: 18th October 2006
Posts: 37
Default

whoa.....

sorry bout this as i'm not from the programming side, but these things looks really complicated, if you don't mind, could you explain line by line of what they do and their specific functions?

a brief idea of what each line do would be great
Reply With Quote
  #3 (permalink)  
Old 15th November 2006, 10:02 AM
tino2099 tino2099 is offline
WD Newbie
 
Join Date: 13th November 2006
Posts: 13
Default

hmmm...

if you want your visitor to exchange link with your site... they will need to go to a linked exchange page...

check_reciprocal($url,$title) --> will be responsible for checking if you site was linked to their website hence the term "linked exchange"... it will be tiresome if you'll be the one checking for every site requesting to exchange with you...

getUrlContents($url, $maximumRedirections = null, $currentRedirection = 0) --> will crawl or grab the code of a given page of a url...
Reply With Quote
  #4 (permalink)  
Old 15th November 2006, 09:57 PM
francisho francisho is offline
WD Newbie
 
Join Date: 18th October 2006
Posts: 37
Default

ah ic, tat's much more comprehensive for me heheheh

thanks a lot tino
Reply With Quote
Reply



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the code to close a window? hassen1 Web Design and Development 4 10th June 2008 09:24 AM
Meta tags hassen1 It's all about E-Business 1 3rd May 2007 01:28 PM
When do crawler come to a site again? varun1182 Search Engine Spiders 2 14th September 2006 06:33 AM
New search crawler for yahoo sourabhweb Yahoo! News 0 30th July 2006 09:23 AM
Yahoo unleashes new search crawler arpan911 Yahoo! News 0 28th July 2006 05:07 PM


All times are GMT -4. The time now is 08:07 PM.


Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vB Ad Management by =RedTyger=