View Full Version : Help me code this please
rymdoll
Sep 7th 2008, 3:38 pm
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?
JAY6390
Sep 7th 2008, 3:49 pm
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
rymdoll
Sep 7th 2008, 3:54 pm
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
JAY6390
Sep 7th 2008, 4:04 pm
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']));Then have yourscript.php get the url from $_GET['url'] and urldecode() it
rymdoll
Sep 7th 2008, 4:09 pm
got the first part thanks, then how to urldecode() , i am a noob :)
by the way reputation added , thank u
JAY6390
Sep 7th 2008, 4:13 pm
Well for example, $url = urldecode($_GET['url']);
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.