You are here: Re: background HTTP request « PHP Programming Language « IT news, forums, messages
Re: background HTTP request

Posted by C. (http://symcbean.blogspot.com/) on 01/14/08 13:47

On 13 Jan, 18:06, seaside <seaside...@mac.com> wrote:
> On 13 Jan., 16:05, "C. (http://symcbean.blogspot.com/)"
>
> <colin.mckin...@gmail.com> wrote:
> > I've got a PHP script, let's call it page.php which renders a page
> > with a fancy dhtml table (http://dhtmlx.com/docs/products/dhtmlxGrid/
> > index.shtml) this connects to another script which provides the XML
> > datafeed to populate the table, lets call it xmlfeed.php
>
> What exactly are you trying to do?
>
> In case you'd like to perform an asynchronous XMLHTTPRequest, I'd
> propose
> xAjax, since this makes requesting data very simple: Register a PHP
> function
> with xAjax and call it from within your JS, as if it would be a JS
> function:
> See here:http://xajaxproject.org/

Fine, if the metadata request was originating at the browser - but I'm
trying to create a request from PHP (to generate the page which will
then make an AJAX request). My PHP script needs to know the metadata
in order to set up the page - its just a matter of convenience to use
the same script for metadata and data.

>
> I wonder, if an asynchronous HTTP request makes any sense in PHP.
> Since PHP does not
> provide some kind of an event model. Using asychronous CURL calls,
> which trigger
> a callback, might be risky, since these calls might corrupt PHPs stack
> frames etc.

? debug_backtrace() and register_tick_function() seem to operate
without corrupting the stack frame.

>
> In case URL wrappers are enabled, you might simply wish to use
> file_get_contents()
> and pass an URL to get the contents of the URL sychnronously.
> See here:http://de3.php.net/file_get_contents

....but the point of my post is that I want to do it asynchronously.

C.

 

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

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