PHP Multiple Requests

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • NohaKhalifa

    PHP Multiple Requests

    Hi All;

    I have a problem facing me in php ...
    I'm developing a web site for a book store that take ISBN from user
    and search it for other bookstores, so i need to make multiple
    requests for these sites to get prices for these books .

    So i need something to make these requests Simultaniously, Somethin
    like multiThreading .

    Anyone have any Idea of how to make this using PHP .

    Thanks alot,
    Noha
  • Chung Leong

    #2
    Re: PHP Multiple Requests

    "NohaKhalif a" <noha_khalifa@g awab.com> wrote in message
    news:949b3128.0 405091108.69c3a 8e7@posting.goo gle.com...[color=blue]
    > Hi All;
    >
    > I have a problem facing me in php ...
    > I'm developing a web site for a book store that take ISBN from user
    > and search it for other bookstores, so i need to make multiple
    > requests for these sites to get prices for these books .
    >
    > So i need something to make these requests Simultaniously, Somethin
    > like multiThreading .
    >
    > Anyone have any Idea of how to make this using PHP .[/color]

    Just connect each of the sites using fopen(), then use stream_select() to
    wait for data to arrive. Use stream_set_bloc king() so that a call to fread()
    doesn't block when there isn't as many bytes as requested.

    I must say though, all this is theoretical. I haven't had a chance to try
    something like this myself.


    Comment

    Working...