Fedora Linux Support Community & Resources Center
  #1  
Old 11th September 2005, 02:14 PM
alirizwan Offline
Registered User
 
Join Date: Sep 2005
Posts: 2
Parallel Processing in PHP

Hi,

I want to perform Parallel Processing in PHP. Let me try to explain my problem.
I want to open 2 files with fopen at the same time.

For Example first file takes 30 seconds and 30 seconds seond file to read in web.
and total time will be 60 seconds.
Can i read both files in 30 seconds with parallel execuation?

<?php

$handle_1 = fopen("www.domain.com/index.php", "r");
$text_1 = fread($handle_1,filesize("$handle_1"));
fclose($handle_1);

$handle_2 = fopen("www.domain.com/index.php", "r");
$text_2 = fread($handle_2,filesize("$handle_2"));
fclose($handle_2);

$text = $text_1 . $text_2;

print $text;

?>

As above code run line by line and takes much time. Is there any way that i can open both or more files Simultaneous ?
How can i execute some my code in parallel processing?


Regards,

Ali Rizwan (Web Developer)
Aztek Computers
http://www.aztekcomputers.com
Reply With Quote
  #2  
Old 14th September 2005, 12:36 PM
htaha Offline
Registered User
 
Join Date: Sep 2005
Posts: 1
How to make parallel processing. I need a simple program doing that.
Reply With Quote
  #3  
Old 14th September 2005, 12:52 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,075
Quote:
Originally Posted by alirizwan
I want to perform Parallel Processing in PHP.
Not possible. Either pick another language, or modify PHP to add support for threads or asynchronous I/O.
Reply With Quote
  #4  
Old 14th September 2005, 03:39 PM
alirizwan Offline
Registered User
 
Join Date: Sep 2005
Posts: 2
can i use threads in php if this is possible then how can i use it.
Reply With Quote
Reply

Tags
parallel, php, processing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Processing issue wtawfik Using Fedora 4 4th October 2009 10:32 PM
rc.local not processing sgtstadanko Using Fedora 1 1st October 2006 07:16 AM


Current GMT-time: 23:44 (Saturday, 20-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
...Camps Bay, Cape Town - Stefanie Dance Studio Travel Photos - Barrio Latino Paris Instagram Photos