|
Posted by Bruno Rafael Moreira de Barros on 11/29/07 11:51
>Thanks to all of you for replying but i still think there should be a
>way to know that. Actually someone may have to implement a check on
>the basis of that. Unavailability of the functionality can break the
>logic!!
Not wanting to be pessimistic or contraditory, I think what he meant
was how to find a way to know which application executed the request.
If you open a request to a PHP script from another PHP script, there
will be a PHP user agent (dont know its name from my head), whilst on
a browser, the browsers details will be sent. Lets just say with PHP,
you can check if its command line by checking IF $argc and $argv
exist, to check if its a browser, compare it to a list of known
browsers (PHP.net has one huge file for that) and if its not run on
command line, if its not run on a known browser, then it can only be
another application.
Is that what you were looking to know, Ojas?
[Back to original message]
|