<?php
// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://hyphens-website.webflow.io/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Base URL of the website you are fetching from
$base_url = "https://hyphens-website.webflow.io/";

// Function to convert relative URLs to absolute URLs
function fix_relative_urls($content, $base_url) {
    // Replace href attributes with absolute URLs
    $content = preg_replace('/href="(\/[^"]*)"/i', 'href="' . $base_url . '$1"', $content);
    
    // Replace src attributes (images, scripts, etc.) with absolute URLs
    $content = preg_replace('/src="(\/[^"]*)"/i', 'src="' . $base_url . '$1"', $content);
    
    return $content;
}

// Fix relative URLs in the fetched HTML content
$response = fix_relative_urls($response, $base_url);

// Output the modified content
echo $response;
?>
