Re: Re: Re: Multitasking Enviornment in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

   I got some code information ffrom net.i added below
that source...if it's useful 4 u ..utilize this...but
i  don't know how to clear ur query...

Sample code:
*************
	i have a C++ module which contains 4 files client.cpp
support.cpp TextBinary.cpp dougnet.c. out of this i
want to use 
5
functions in client.cpp in a php4 script.
 	i did the following steps :-

1. created a interface file client.i. its contents r
as follows

/* File : client.i */
%{
#include "CvsCommands.h"
#include "client.h"
#include "dougnet.h"
#include "support.h"
#include "common.h"
%}

/* Let's just grab the original header file here */
%include "client.h"

2. created a interface file kcvsClient.i. its contents
r as 
follows

%module kcvsClient

%include client.i

3. use swig as follows

swig -php4 -phpfull -noproxy kcvsClient.i

4. compile all the files to create a .so file as
follows

#######################################################################
# Makefile for kcvsClient.
# Date        : Jan 20, 2003.
# ChangeLog   :
#######################################################################

CPP=g++
CC=gcc
INC=-I/usr/include/php/ext -I/usr/include/php/main 
-I/usr/include/php/regex -I/usr/include/php/TSRM 
-I/usr/include/php/Zend

kcvsClient_wrap.o:kcvsClient_wrap.cpp dougnet.o
TextBinary.o 
support.o client.o
         ${CPP} $(INC) -c $*.cpp

dougnet.o: dougnet.c dougnet.h
         ${CC} -c $*.c

TextBinary.o: TextBinary.cpp TextBinary.h
         ${CPP} -c $*.cpp

support.o: support.cpp support.h
         ${CPP} -c $*.cpp

client.o: client.cpp client.h
         ${CPP} -c $*.cpp

/********* end of make file ****************/

g++ -shared client.o support.o kcvsClient_wrap.o
dougnet.o 
TextBinary.o -o php_kcvsClient.so


4. use the php_kcvsClient.so file in a php4 script


--- girija nandan sinha <gn1500@xxxxxxxxxxxxxx> wrote:

>   hy mohan
>  my problem is that.I want to extend c++ in php and
> reverse also.
> .This can be possible or not. If possible please
> tell me detail step.
> i am waitting your reply.
>  girija
> 
> 
> 
> On Thu, 18 Aug 2005 Kolangi Mohan.A wrote :
> >Hi,
> >
> >    i'm mohan..what is ur problem?..i think
> instalation
> >probelm...
> >
> >
> >--- girija nandan sinha <gn1500@xxxxxxxxxxxxxx>
> wrote:
> >
> > > I am working on php. Any one can help me.
> > > I am working on biomatics devices database
> reading.
> > > I want to extend php to c++.
> > >  i have  done following work but not get 
> result.
> > > (1) Install php5  with apache2
> > >        anybody help me
> > >  girija
> > >
> > >
> > >
> > >
> > >
> > > On Thu, 18 Aug 2005 Ryan Sexton wrote :
> > > >Yes, it's call pcntl
> > > >http://www.php.net/pcntl
> > > >
> > > >Thank you,
> > > >Ryan Sexton
> > > >On Aug 17, 2005, at 11:44 AM, abhishek jain
> wrote:
> > > >
> > > >Hi Friends,
> > > >Now PERL do have a brilliant Multi-tasking
> Module
> > > called as POE.
> > > >Do we have a same thing in PHP by which I can
> do
> > > parallel processing.
> > > >eg. fetch 10 pages simultaneously rather than 1
> > > after the another.
> > > >Pl. do reply.
> > > >--
> > > >Regards
> > > >Abhishek jain
> > > >
> > >
> >__________________________________________________
> > > >Do You Yahoo!?
> > > >Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > >http://mail.yahoo.com
> > > >
> > > >[Non-text portions of this message have been
> > > removed]
> > > >
> > > >
> > > >
> > > >
> > > >PHP Data object relational mapping generator -
> > > >http://www.meta-language.net/
> > > >Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >PHP Data object relational mapping generator -
> > > http://www.meta-language.net/
> > > >Yahoo! Groups Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been
> > > removed]
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
>
>____________________________________________________
> >Send a rakhi to your brother, buy gifts and win
> attractive prizes. Log on to
> http://in.promos.yahoo.com/rakhi/index.html
> >
> >
> >
> >
> >
> >PHP Data object relational mapping generator -
> http://www.meta-language.net/
> >Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
> 
> 
> [Non-text portions of this message have been
> removed]
> 
> 



	

	
		
____________________________________________________
Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to http://in.promos.yahoo.com/rakhi/index.html


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h2blc4a/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124445868/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux