i am trying to make a small script with my little php knowledge. i want to implement a small piece of code on the script, so it sends the URL of the site that is running it to another site, then the receiving site will store it on a database. how to do this please?
I think its quite safe to say you need to provide a lot more information than this, and perhaps give an example. are the two sites both related, ie do you own both, and can have scripts on both? if not, which of the two is yours, the first or the latter etc etc
i own the script that i will sell i want the sites where the script is installed to call my owned site and give him the url they are running on. i wanna do a callback, because i am unable to make a licensing system so better for me to stock urls, time to make another script that checks licenses for domains
oh i see. well the easiest way is to send the URL via a simple GET statement in your script with the $_SERVER['HTTP_HOST'] using something like file_get_contents('http://www.yourdomain.com/yourscript.php?url='.urlencode($_SERVER['HTTP_HOST'])); PHP: Then have yourscript.php get the url from $_GET['url'] and urldecode() it
got the first part thanks, then how to urldecode() , i am a noob by the way reputation added , thank u