Jump to content

link active?


merylvingien

Recommended Posts

Hi fellas, is there a way to check if a site links to mine using php?

 

Ive done a few searches but nothing really stands out as being straightfoward.

 

I have a section where people can link to thier sites from mine, but i really dont want to have to manually validate every link to see if they are playing nicley. I was wondering if i can use php to go and check if they have actually put a link to my site and if so it activates thier link to thier site!

Link to comment
Share on other sites

All you need to do is grab the HTML source of their page using file_get_contents or cURL, then search it to see if it contains your link. Something as simple as strpos could be used for that. Of course a system that simple will only work if it's a single page site. To expand the criteria you would have to recursively traverse their site searching for your URL.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.