execute external php file inside php file

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
geethalakshmi
Forum Commoner
Posts: 31
Joined: Thu Apr 24, 2008 10:38 pm

execute external php file inside php file

Post by geethalakshmi »

I am working with the concept of threading, Here I want to execute a same php file more than one time simultaneously. Is there is any command to execute php file?
I used exec() function to execute external php file, issue here is i cannot implement threading concept here. When i call this exec() function for different files, the files are executed one after the other, it is not executed simultaneously.
Please suggest me how to implement threading concept.
Even when I am using exec() function I am not able to pass more than one arguments, ie., arguments after '&' is not passed to the remote program.

Code: Select all

exec("C:/path/wget.exe -q http://localhost/sitemapprototype/crawl.php?thread={$nam}&uurl={$urll}");
How can I solve this issue?

Thanks in advance
Geetha
Last edited by onion2k on Wed Aug 27, 2008 7:08 am, edited 1 time in total.
Reason: Unnecessary link removed. Don't add it again or you'll be banned for spamming.
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

Re: execute external php file inside php file

Post by ghurtado »

What is this for?
marcth
Forum Contributor
Posts: 142
Joined: Mon Aug 25, 2008 8:16 am

Re: execute external php file inside php file

Post by marcth »

Code: Select all

include('http://www.example.com/file.txt?foo=1&bar=2');
should work.

You should use SOAP through ;)
Post Reply