Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7008275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:42:50+00:00 2026-05-27T21:42:50+00:00

Hi guys I have this code that checks linkback: $reciprocal_linkback = reciprocal_linkback($contenturl,http://www.mydomain.com,1); if ($reciprocal_linkback==0)

  • 0

Hi guys I have this code that checks linkback:

$reciprocal_linkback = reciprocal_linkback("$contenturl","http://www.mydomain.com",1);

if ("$reciprocal_linkback"=="0") {

$contenturl is the url that will be checked against my website ( http://www.mydomain.com )

The problem is that I need to check the url and the main page.
I used this code:

$parse = parse_url($contenturl);

And the result at the end would be this:

$parse = parse_url($contenturl);
$reciprocal_linkback = reciprocal_linkback("$contenturl, $parse","http://www.mydomain.com",1);

    if ("$reciprocal_linkback"=="0") {

Im not sure how to use multiple variables like $contenturl, $parse so I can check both links against my domain.

I would appreciate any help on this.

Sicnerely.

Edit: heres the function

function reciprocal_linkback($check_url, $link, $strict = "0") {

    global $global;
    global $field;

    $field['hostname'] = "";
    $field['hostname_port'] = "80";
    $field['result'] = "0";

    preg_match("/^(http:\/\/)?([^\/]+)/i",$check_url, $field['hostname']);

    $field['hostname_short'] = $field['hostname'][2];
    $field['hostname_end'] = str_replace($field['hostname'][0], "", $check_url); # We don't want http://, we want the domain

    $field['url_get'] = fsockopen($field['hostname_short'], $field['hostname_port']); # Connect to domain

    if ($field['url_get']) { # We're connected...

        if(trim($field['hostname_end'])=="") { # No filename, add a slash to end URL

            $field['hostname_page'] = "/";

        } else {

            $field['hostname_page'] = $field['hostname_end']; # Filename

        }

        fputs($field['url_get'], "GET ".$field['hostname_page']." HTTP/1.0\r\nHost: ".$field['hostname_short']."\r\n\r\n"); # Request page from domain

        $field['url_content'] = "";

        while(!feof($field['url_get'])) { # Get data by line and store

            $field['url_content'] .= fgets($field['url_get'], 10240);

        }

        if (eregi($link, $field['url_content'])) { # Can we find the URL in the page?

            if ("$strict"=="1") { # Check for nofollow

                $field['result'] = "1"; # Success, we have a link, now check for nofollow

                $field['link_position'] = strpos($field['url_content'], $link); # Find position of URL being checked

                $field['link_html_end'] = substr($field['url_content'],($field['link_position'] + strlen($link)),200); # Get HTML after URL
                $field['link_html_start'] = substr($field['url_content'],($field['link_position'] - strlen($link) - 100),200); # Get HTML before URL

                $field['link_html_end_explode'] = explode(">",$field['link_html_end']);
                $field['link_html_start_explode'] = explode("<",$field['link_html_start']);

                $link_html_start_count = count($field['link_html_start_explode']) - 1;
                $field['link_html_start_explode'] = explode("=",$field['link_html_start_explode'][$link_html_start_count]);

                $field['link_html_tag'] = $field['link_html_end_explode'][0].$field['link_html_start_explode'][0]; # Get link HTML, without URL and surrounding HTML

                if (eregi("nofollow", $field['link_html_tag'])) { # Can we find a nofollow tag in link HTML?

                    $field['result'] = "0"; # Nofollow tag found

                }

            } else {

                $field['result'] = "1"; # Success, we have a link, but nofollow not checked

            }
        }

        fclose($field['url_get']);

    } else {

        $field['result'] = "2"; # Cannot read page

    }

    return $field['result'];

}

And the complete code i mention above:

// Check to see if have backlink and nofollow atribute

$reciprocal_linkback = reciprocal_linkback("$contenturl","http://www.dumpvid.com",1);

if ("$reciprocal_linkback"=="0") {

$_SESSION['submitstatus'] = "<div class=error><b>Error:</b> Backlink was not found, or nofollow detected.</div> ";
header('Location: '.$frompage.'');
 exit; 

}

I need to make it check the url itself and the domain from that same url.

thats why i used the $parse = parse_url($contenturl); to transform the url in domain.tld only, but dint worked.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:42:51+00:00Added an answer on May 27, 2026 at 9:42 pm

    You can do it like that:

    $contenturl = "http://domain.com/video_content.html";
    $parse = parse_url($contenturl);
    $base_url = $parse["host"]; // domain.com
    

    And call it twice:

    $linkback1 = reciprocal_linkback($contenturl, "http://www.mydomain.com", 1);
    $linkback2 = reciprocal_linkback($base_url, "http://www.mydomain.com", 1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi guys I'm using this code http://www.w3schools.com/php/php_file_upload.asp to upload files and it works great
I have a simple JQuery code that will check the current URL and search
Hi guys i have the following code $.ajax({ url: http://localhost/twee/chat/getnumcom, type: 'POST', data: form_data,
Hey guys I simply cannot get this to work. I have some content that
this code checks if i have mail from gmail, then sends m over serial
Hi Guys I currently have this table MEMBER **ID Position Latitude Longitute** 1 1
guys i have arrays in which i have to match this kind of text
Hi guys I am having issue I have this query: SELECT * FROM useraccount
Thus far you guys have been wildly helpful with me getting this little ditty
Hello Guys! I started learning python GUI development. Let's say I have this script:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.