You are here: Re: Script running under Command Prompt or Browser or some other application? « PHP Programming Language « IT news, forums, messages
Re: Script running under Command Prompt or Browser or some other application?

Posted by NC on 12/07/07 15:54

On Dec 5, 8:05 pm, Ojas <contacto...@gmail.com> wrote:
>
> Meanwhile, i would appreciate if anyone of you could share
> the list of all possible php sapi (along with their possible
> application from which they will be in existence).

It's given in the notes to the php_sapi_name() documentation:

http://www.php.net/manual/en/function.php-sapi-name.php

Here's the list:

- aolserver
- activescript
- apache
- cgi-fcgi
- cgi
- isapi
- nsapi
- phttpd
- roxen
- java_servlet
- thttpd
- pi3web
- apache2filter
- caudium
- apache2handler
- tux
- webjames
- cli
- embed
- milter

> To continue the discussion, i would like to extend it
> a little bit further by asking how to detect whether
> a request to the server has been made directly or using
> sockets or using CURL from the client side application?

There is no way to tell. Client-side applications (sometimes)
identify themselves by sending a "User-Agent:" request header, the
contents of which is available to a PHP script as
$_SERVER['HTTP_USER_AGENT']. However, it is possible (and, in fact,
rather easy) to configure cURL or a socket application to send ANY
"User-Agent:" header, including a header normally associated with a
Web browser. Simply put, cURL or a socket application can easily and
very convincingly pretend to be a browser...

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация