Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPro.org:
Tutorial - Reciprocal Links
Oct 28, 2008 @ 17:52:19

Kevin Waterson has posted a new tutorial to the PHPro.org website today stepping you through the automation of handing reciprocal links.

This tutorial looks at the process of reciprocal links. That is, links generated from websites that have links to your own page. These links back to a page can be detected from the HTTP REFERER which, in PHP, can be detected via the super global variable $_SERVER['HTTP_REFERER']. Care should be taken when using this variable as it is set from userland and, as such, should not be trusted.

His method stores the linking information (gathered from the referrer) and calls an addLinks method that checks to ensure the page format is valid and that it's a real site before putting it into the table. Complete code for this, a fetch method and a simple database layer to put it on top of are included.

tagged: reciprocal links tutorial class validate domain referrer

Link:

PHPPro.org:
SQL Intro, Reciprocal Links & Finding Links with DOM
Oct 06, 2008 @ 17:09:15

Kevin Waterson has added three new tutorials to his PHPPro.org website recently:

  • Introduction To SQL - The language used in relational databases is SQL. Regardless of the database used, a standard language is used to communicate with them all. This tutorial shows some basic concepts to using SQL.
  • Reciprocal Links - Automating reciprocal links at first glance looks a daunting task. This helper class takes away much of the pain of what can be a mindlessly tedious process and simplifies it into a few easy to use class methods
  • Get Links With DOM - Perhaps the biggest mistake people make when trying to get URLs or link text from a web page is trying to do it using regular expressions. The job can be done with regular expressions, however, there is a high overhead in having preg loop over the entire document many times. The correct way, and the faster, and infinitely cooler ways is to use DOM.

You can find the links to these and many other great tutorials over on the PHPPro.org website's tutorials section.

tagged: tutorial sql intro reciprocal link dom find

Link:


Trending Topics: