Replace the code

Steps to Replace the Code:

  1. Access Your Hosting File Manager or FTP Client:
    • Navigate to the document root of your subdomain (e.g., /public_html/flip).
  2. Open redirect.php:
    • Locate the redirect.php file and open it for editing.
  3. Replace the Existing Code:
    • Delete all the existing code in redirect.php.
    • Copy and paste the updated code provided above into the file.
  4. Save the Changes:
    • Save the changes to redirect.php.

Testing the Changes

After updating redirect.php, test the converted URLs by:

  1. Generating a New Link:
    • Use the tool to generate a new link.
  2. Sharing the Link on Social Media:
    • Share the generated link on various social media platforms, including Flipboard, to ensure the correct metadata (title, description, image) is displayed.
  3. Ensuring Redirection Works:
    • Click on the generated link to ensure it redirects to the appropriate URL based on the specified conditions.

These steps should ensure that the generated URLs display the correct information when shared on social media and that the redirections function as expected.

Testing the Changes

After making these changes:

  1. Generate New Links:
    • Use the tool to generate new links.
  2. Share on Social Media:
    • Share the generated links on various social media platforms like Flipboard and ensure that the correct metadata (title, description, image) is displayed.
  3. Check Freshness:
    • Ensure that the generated links appear as fresh URLs with the current date on social media platforms.

These changes should help make the tool work as intended, ensuring that the URLs are seen as fresh and fetch the correct metadata when shared on social media platforms.

xplanation of Changes

  1. Random Number Generation:
    • Added a random number between 1 and 50 to the path to ensure uniqueness.
  2. Meta Tags:
    • Extracted title, description, and image from the canonical URL and dynamically set these in the HTML head using Open Graph and Twitter meta tags.

2. Update the index.php File

Ensure that the index.php file includes the changes to use the provided domain dynamically and to append a random number:

Similar Posts

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *