|
Posted by Captain Paralytic on 11/29/07 12:52
On 29 Nov, 11:51, Bruno Rafael Moreira de Barros
<brunormbar...@gmail.com> wrote:
> >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?
"if its not run on a known browser" and I say again, a browser does
not run a php script. A script will never be run on a browser.
Navigation:
[Reply to this message]
|