licensing - php check license id with postback url -
i'm working on php installer web application / software.
the installer need valid license id finish installation (for example: "ads34nsi9sa").
to check if license id valid have php script on main domain check db , return 1 if licenseid exist , active or 0 otherwise. file should called this:
https://www.domain.com/check.php?id=ads34nsi9sa
so i'm wondering if correct use file_get_contents() check license id via php..
$check = file_get_contents("https://www.domain.com/check.php?id=$license_field"); if( $check == 1 ) {} // finish installation else {} // print error msg
is way correct , secure?
of course, need url-encode data before injecting url. , it's remote server detect brute force attacks. other that:
your check assumes
allow_url_fopen
enabled , php has ssl support. make sure explain in requisites , ready support enquiries , workaround coding.data sent through ssl should remain private enough.
and, well, isn't particularly difficult crack. malicious users need impersonate remote site.
Comments
Post a Comment