Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38618 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20183 invoked from network); 25 Jun 2008 20:11:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2008 20:11:21 -0000 Authentication-Results: pb1.pair.com header.from=prf.kishorekumar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=prf.kishorekumar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.44.29 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: prf.kishorekumar@gmail.com X-Host-Fingerprint: 74.125.44.29 yx-out-2324.google.com Received: from [74.125.44.29] ([74.125.44.29:28932] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6F/12-20985-766A2684 for ; Wed, 25 Jun 2008 16:11:20 -0400 Received: by yx-out-2324.google.com with SMTP id 3so645402yxj.83 for ; Wed, 25 Jun 2008 13:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:mime-version:content-type:x-google-sender-auth; bh=VqITOnYykgjPjbNNbhXsfi0t54DGJhiKNzzDr3jfWNM=; b=X7JqmMxrEMGcg7umL6ajdSXhXNbfGNj76X1OTGQN5jse1rWOfH9qxn3cqZXIgK1Mjk j7maSLAZ9yaMCXxjW+/DKFZb+PzQdRqUU8lLWDb+qw1q1QJu4nBWf99aIPqTKCNP76t8 bafJdqr79HNP31MhEApEcnHDlvnK+GMuC0HE4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :x-google-sender-auth; b=lstsybG9/l+MujgT86lrNEFhODQyR4GSLjdOqRcdl9itnLRBevaa36EQRHc0l3UTKX sA/XoE52r1qGchtQsHp9gxVcGD5TuUecdkDoPgBWc4aH2ukhb4G925vXuyYvm/zYthqN 6f+EcM/Sb7p9GXoW2ToKr8+d0DxkVa53ehnFo= Received: by 10.151.50.11 with SMTP id c11mr323349ybk.12.1214424676844; Wed, 25 Jun 2008 13:11:16 -0700 (PDT) Received: by 10.151.106.16 with HTTP; Wed, 25 Jun 2008 13:11:16 -0700 (PDT) Message-ID: Date: Thu, 26 Jun 2008 01:41:16 +0530 Sender: prf.kishorekumar@gmail.com To: "PHP Internals" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4655_33507535.1214424676833" X-Google-Sender-Auth: 426a3a2e34b246d9 Subject: Using Network functions. From: mangol.smith@gmail.com ("Mangol Smith") ------=_Part_4655_33507535.1214424676833 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey guys, I just started hacking PHP. I want to use Netwok Functions. So far from the source code browsing I learnt that In PHP *"obvious" solution is not the right answer.* The obvious solution for implementing HTTP methods or any Network functions for that matter, is using socket(), connect(), send(), recv() with appropriate HTTP request which only works for *NIX systems. So, there must be some kind of wrappers over it make these Platform Independent. Though, I looked into the implementations of PHP_FUNCTION('php_get_contents'). I didn't get much of it. I din't see any socket functions in its implementation. I saw some kind of stream_* functions. (which was complete abstract to me). 1. Can any one help me in using Network functions? 2. What does streams has to do with this networking? Can it be done using streams? 3. In List of Supported Protocols/Wrappersits mentioned that Allows read-only access to files/resources via HTTP 1.0, using the HTTP GET method. This means isn't there any wrapper to use all HTTP methods. I'm concerned about HTTP PUT/POST (esp. PUT) method. How can I use that method? 4. what are the other alternatives (if any)? ------=_Part_4655_33507535.1214424676833--