thealgoslingers/personalized-php

The PersonalizedContent class provides functionalities for fetching personalized content based on the user's IP address.

v1.3.1 2024-07-12 21:23 UTC

This package is auto-updated.

Last update: 2025-04-12 23:03:42 UTC


README

The PersonalizedContent class provides functionalities for fetching personalized content based on the user's IP address.

The class can be served as the foundamental for incorporating algorithms to determine the most accurate location and subsequently tailor the content displayed to the user's unique geographic context to create a more engaging and personalized user experience, potentially leading to increased user engagement, higher conversion rates, and strengthened customer satisfaction. It may also employ various techniques, including accessing geo-location databases, utilizing IP address lookup services.

Requirements

Please obtain Api Key from IP2LOCATION.IO

Installation

composer require thealgoslingers/personalized-php

Usage

<?php
require "path/to/vendor/autoload.php";

use thealgoslingers/PersonalizedContent;

$api_key = 'your_api_key_here';
$pc      = new PersonalizedContent($api_key);
$user_ip = '8.8.8.8';
echo $pc->getContent($user_ip);