functionality required only to show certificate(image) for registerd members

I have a problem please help me,
I want to junrate a certificate(image code) general code from my site, for registers members certificate will only show on his sites.
for exmple abc.com is my site registerd member and he placed that code on his site like bellow

or any code (like facebook social plugin or like plugin of facebook or etc)

when the its calling from abc.com the code will display the certificate(image) but when same code applies from another location like www.def.com the certificate(image) should not to display.
so kindly tell me ([email protected]) how its possible

You would get the website that is in the link:

[php]if(isset($_GET[‘member’])) {
$site = $_GET[‘member’];

$allowed_sites = array('site-one.com', 'site-two.com', 'sitethree.org');

if(in_array($site, $allowed_sites)) {
    $image_path = 'site-ok.jpg';
} else {
    $image_path = 'site-not-allowed.jpg';
}

} else {
$image_path = ‘site-not-allowed.jpg’;
}

header(‘Content-Type: image/jpeg’);
header('Content-Length: ’ . filesize($image_path));
readfile($image_path);[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service