Page 1 of 1

How to know where my code is running

Posted: Tue Aug 16, 2005 2:57 am
by namitjung
Hello all,

I am developing projects for client but i don't know where it is running.Client made payment to me and i provide full source code to him.

Is there any php code that would let me know where my php code is running??

Thank you

Posted: Tue Aug 16, 2005 3:34 am
by anjanesh
Either insert a mail statement or connect to a remote db / file and insert the IP, host etc - just make sure you flag it - so that it doesnt keep notifying you where the php code is running each time the php script is executed !

Posted: Tue Aug 16, 2005 3:44 am
by CoderGoblin
Be aware some people may view any inbuilt notification as a "hack". If the contract specifies that the code belongs to them you have may have no "rights" to what they do with it or where they place it. Normally if you build a good working relationship you should be able to just ask them.

But what does flag mean?

Posted: Tue Aug 16, 2005 3:59 am
by namitjung
Thank you for your reply.But what does this flag mean?Do i have to check a db field and set it to some value and check that value??

Don't understand clearly. :(

Posted: Tue Aug 16, 2005 4:06 am
by anjanesh
Place some mark somewhere - db, remote file or whereever - so that you not get notified each and every time the script gets executed.
You'll have to figure out on your own because this is really going behind someone's back.

Is it good idea

Posted: Tue Aug 16, 2005 4:22 am
by namitjung
But where i have to mark it. I thought that it should send me mail when admin is login. But each time admin is login,i will get an email. Then i thought creating a table with a field name and then setting it to 0 and when admin is login for the first time set it to one and send an email to me. Next time when admin is login it will check whether the db field is set to zero or not. Is this a good idea?

Posted: Tue Aug 16, 2005 7:25 am
by feyd
bumping a thread within one hour of its last post is very uncool. :x