embedding php assitance required

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
monger
Forum Newbie
Posts: 2
Joined: Wed Jan 14, 2004 4:02 am

embedding php assitance required

Post by monger »

im try to make a script where someone copy-paste one part of it onto one page of his website, and everytime the page is loaded, it runs my bit of code and adds the client ip into a database. this bit i have done with no problem. (using an iframe of height "0" and width "0")

my problem is when i come to the secind bit of code that counts the unique ip addresses and then outputs them.
my code is sommat roughly like this
(xxx is filled in by the user)
<?php
$userid = XXX
$password = XXX
$unique = XXX //1 = true
...
?>
i want it to retrieve a number from a remote webpage
the remote page would be something like:
http://monger.homeftp.net/gethit.php?id=<?php echo $userid; ?>&pass=<?php echo $password; ?>&unique=<?php echo $unique;?>

running this page will happily output the hit count onto the page, but i want it so the code on the users site cvan output that figure.

my problem is that i only want users to have access to small segments of my code and not the whole thing which obviously includes my username and password for my SQL database.

does this make sense?
any suggestions?


__________________
Post Reply