Http Server Tutorial Or Code Example

Hi all, i’m new to PHP and Yii.

I need to write an HTTP server but i cant find any tutorial or code example for it… dose any one have any simple code example that will clarify how to handle a request and how to response?


Why do you need to write an http server? Apache is an http server.

PS. You can find all you need in documentation. There is a document for all the framework and a guide to build a blog.

Hi, Thank you.

I might not explained my self properly. plus i’m really new to yii and PHP.

I’m an Android developer and i need a server with a DB, i found the guides for the SQL framework of yii. but now i need to communicate with my application, someone suggested yii for both (DB and HTTP). but i’m stuck in the HTTP part, i don’t know how to receive and send data from my server.

hope it clarify my issue… Thanks again.

This is still a bit confusing: In Yii (and most web application frameworks really), we rely on an underlying http server to handle all incoming and outgoing http messages. Vanilla Yii features only minimal facilities for this. Where they exist, they are mostly there to provide an abstraction layer for session cookies etc.

If your greatest concern is a messaging format enabling your server to interact with a server hosting a Yii app, there is excellent support for WSDL. I’m still not sure why you would need this server-to-server communication in the first place. Couldn’t you connect to a MySQL server directly?

GREAT! all i needed was the CController documentation, i just didn’t know what to look for.

Found it via you link, Thanks!!