How to add self-help links to your website (PHP)

Source: Internet
Author: User
Keywords Self-Help links PHP

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

We all know that the site has a large number of external links to their own ranking of the site is very important, but also to bring a certain amount of traffic.

Today, I added a self-help link feature to my website http://xikc.com, written in PHP. function similar to a large number of self-help links on the Web site, if a site on the home page on the link I stood, click Link to http://xikc.com, this site will appear in the link to the first http://xikc.com/auto_link.php link page.

Here's a quick overview of how to do this:

First of all, need when I stand on the home page, get the source address, in PHP is very simple. $_server["Http_referer"] can be obtained. Because the verification process each other's links need a certain amount of time, will affect the opening speed of the home page, so I did not like most self-help links to stay in the home page to deal with the link, but in the home page put an invisible iframe, will $_server["Http_referer"] Read the address to auto_link.php to deal with.

The second step, in the auto_link.php processing, get the address of the other side, first from their own database to find out whether the other side of the link exists, if there is a time to update it. If there is no other link, then first verify that the other side of the Web page is there any link to my station. My approach is also very simple, fopen read each other's home page, and then search for whether there is http://xikc.com this string, if there is a link exists.

The third step is to read the title of each other's home page and description content, showing the other side of the link. The link to each other, title,description content into the database. One more important thing is to record an update time, which can be used to sort.

Fourth step, show. According to the update time, reverse the display of all links.

Unfinished steps, I would like to add tag in the properties of the link, so that the other side of the Web site will not only appear in this link page, will also appear in the relevant news search results page. But this need to work a little bit bigger, it may take several days to write well.

Everyone can go to my site to see the effect, if interested can do a friendship link test. If you have any questions, please send me a letter xikc.com#gmail.com. If you want this part of the code, you can contact me, I just have a little php experience should be able to add this function to their own website.

Links to self-help links are at the bottom of the xikc.com homepage. http://xikc.com/auto_link.php

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.