简体   繁体   中英

How do I make a site load PHP from another site if license key is correct?

So, I have code on my server. I want someone else's website to load my HTML, CSS, and PHP code into their website but only if they have the correct license key in their PHP loader thing.

# This is their code, the loader
include('https://example.com/index.php')
$license_key = 00000000;
#This is MY code that's being loaded into their website
$valid_license_keys = ["10203", "000000"];
if ($license_key == $valid_license_keys) {
    echo Valid, loading page.;
} else {
echo "<h1>INVALID LICENSE!!!</h1>"
}

How can I actually make it work

When you loading any file from 3rd site it will take some time and then your application will be very very slow.

Change your technical solution. For example Ioncube Encoder solution. PHP files are encoded and your code is safe.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM