Friday, August 8. 2008Phurple - per se PHPurpleTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
After looking through the documentation and kicking the tires a bit, I see that you can find all the buddies associated with a certain buddy group, but I don't see any way to grab all the groups for a user's buddy list.
Is this feature just not implemented or can you pass the findGroup method an * or something which returns an array of buddygroup objects?
Scott,
this isn't yet implemented. However, the functionality itself does exist in the libpurple api, which phurple does mirror less or more. So it's just a question of time, when it comes into phurple. For now, you could try to parse the xml directly by hand. Regards, Anatoliy
Hi, can you tell me how can I create blist.xml because i get in debug mode this mesage:
(23:24:50) util: Reading file smileys.xml from directory /tmp/phurple-test (23:24:50) util: File /tmp/phurple-test/smileys.xml does not exist (this is not necessarily an error) (23:24:50) stun: using server (23:24:50) util: Reading file blist.xml from directory /tmp/phurple-test (23:24:50) util: File /tmp/phurple-test/blist.xml does not exist (this is not necessarily an error) (23:24:50) prefs: Reading /tmp/phurple-test/prefs.xml (23:24:50) prefs: /plugins/gtk/libnotify/blocked_nicks changed, scheduling save. Thanks
Thank you,i sorry about i was not here sooner.
I following your instruction now Ah, not sure what distro u use, but this like ./phpize && ./configure --enable-phurple && make should be: phpize && ./configure --enable-phurple && make Am i right?
yes Nam, thank you. ./phpize supposed to be in the same dir, which is wrong
I have compiled it successfully! And also can see the Phurple modules in the phpinfo.php,but the bad things is that when I web browser the Example.php,It goes to a download window.
When I delete this: $client = CustomPhurpleClient::getInstance() and the download window does'n show agian. Is there somthing wrong? And how can i solve it?
I got it in the Command Line way!
Thank you for you great job, Anatoliy!
Hi Bruce,
thanks for trying the stuff. Could you please let me know, on which apache/php version the bud did happen? Or may be you could debug your apache? It would be very nice ... anyway, best regards
PHP5.2.6
Apache2.2.9 Ubuntu 8.04 LTS Desktop Edition build PHP as a mod of Apache
By the way ,the browser is firefox
Then I see you word: "Only one restriction conditioned by libpurple itself is there - use is definitely safe within CGI environment only" I rebuild the PHP as CGI binary "phpinfo.php" works fine but "test.php" come to a 500 error: "Premature end of script headers: php " Also, When I delete this: $client = CustomPhurpleClient::getInstance() 500 Error doesn't show agian. Please help me again,thanks!
Thanks for providing info about your environment. I think I should do more testing for debian because many bugs reported come from ubuntu users.
Concerning CGI: you should check if a simple hello world script is running normally and your server settings are ok before you start to do something. Or - check file permissions of the script. Or - try to place the php script into the cgi-bin dir and allow server to handle it as cgi. Btw - there is no need to rebuild the whole php, placing scripts within cgi-bin and instructing server is normally enough. But for this of course a cgi binary is needed )). This way you can use php at the same time as module and as cgi. best regards
I add this:
# configuration for php phurple module extension=phurple.so phurple.custom_plugin_path="/usr/local/lib/purple-2" to the php.ini of CLI then use php test.php insted of php -n -d extension_dir=.libs test.php It just show one word "skip". I think it doesn't load the phurple module? and command: php phpinfo.php,I see the Phurple there. Then I add: if(class_exists("PhurpleClient")){ echo "PhurpleClient\n"; } if(class_exists("CustomPhurpleClient")){ echo "CustomPhurpleClient\n"; } to the test.php when php test.php,the result is : PhurpleClient CustomPhurpleClient Skip web Browser it.shows: PhurpleClient CustomPhurpleClient I think that is why it can work in the CLI and not the browser! May be we should change the php.ini or something else? Best regards!
well, if you loading the ext within php.ini and it crashes, there is a debug need. but normally it's the same as invoking:
php -n -d extension_dir=.libs -d extension=phurple.so -f test.php which works fine. Could u send to me the valgrind and libpurple debug output? For libpurple just be sure to set PhurpleClient::setDebug(true); in the script. Valgrind could be run as follows for cli: valgrind --log-file=log php test.php Are you aware of running php as cgi within apache? And no, there are no additional php.ini options yet ...
I solved it now!
remove the line: extension=phurple.so phurple.custom_plugin_path="/usr/local/lib/purple-2" just use the dl(); It's working fine! Thanks again,Anatoliy!
i use example.php in doc,i can't login. because phurple didn't auto accept the server certificates and save it into this dir : certificates/x509//tls_peers,
then, i copy certificates from ~/home/[user]/.purple/certificates/x509/tls_peers/. it's work! i can login. can it auto accept certificates???
This behavior of the libpurple starts with v2.5 I think. It does not copy certs but still works after a long time of waiting. And this is regarding only certs, which authority can't be confimed.
I was having the same problem with certificates not getting copied over. I was using libpurple compiled from 2.4.0 and upgraded to 2.5.3, no problems now.
-Eric
Hi Hemon,
how to get certificates/x509/tls_peers my test script not able to send IM. What can be reason for this? it only shows "my heartbeat" from above script. My server info Libpurple 2.5.2 CentOs php 5.1.6 Thanks in advance
Hi Anatoliy. When i used msn send message, the buddy was offline and the msn server would reponse error.What do i catche the exception.
I only need the list of friends for a yahoo user. Could anyone help me with some hints or some code?
I thank you in advance guys...
I compiled your extension and got it working. Using regular gmail account for testing I was able to get a message though.
However, when I use my company email (a gmail partner one) that supports google talk it tries to connect to fliptrack.com looking for a chat server instead of talk.google.com. How should I modify this line to tell libpurple to use talk.google.com instead of fliptrack.com? $client->addAccount("xmpp://eric@fliptrack.com:password"); I've tried (replaced the actual password with 'password' in this comment: $client->addAccount("xmpp://eric@fliptrack.com:password@talk.google.com:5223"); but it didn't work: got this error: account: Connecting to account eric@fliptrack.com/Home Line 146 (14:24:48) account: Connecting to account eric@fliptrack.com/Home (14:24:48) prefs: /purple/savedstatus/isidleaway changed, scheduling save. (14:24:48) connection: Connecting. gc = 0xe730e0 (14:24:48) dnssrv: querying SRV record for _xmpp-client._tcp.fliptrack.com (14:24:48) prefs: /purple/savedstatus/isidleaway changed, scheduling save. my own heartbeat (14:24:48) dnssrv: found 0 SRV entries (14:24:48) dns: DNS query for 'fliptrack.com' queued my own heartbeat (14:24:49) dns: Created new DNS child 10310, there are now 1 children. (14:24:49) dns: Successfully sent DNS request to child 10310 my own heartbeat (14:24:50) dns: Got response for 'fliptrack.com' (14:24:50) dnsquery: IP resolved for fliptrack.com (14:24:50) proxy: Attempting connection to 64.225.159.221 (14:24:50) proxy: Connecting to fliptrack.com:5223 with no proxy (14:24:50) proxy: Connection in progress That ip is our server, not google's. Any help would be appreciated! -Thanks Eric
I was also wondering if you knew where I could find a list of the protocol names that libpurple supports.
"protocol://email@host:port" so far I know 'msn' and 'xmpp' are valid names. i'm guessing aim is either 'aim' or 'oscar'? I tried searching through the libpurple source but no luck yet. -any help would be much appreciated! Eric
hi there
regarding your first question - the first account gets connected when you add it, i see no binding with second gmail account. the supported protocols you could get with PhurpleClient::getProtocols(), but this returns only names. regards anatoliy
What do you mean by binding?
This is what I'm trying to get to work but doesn't: $client->addAccount("xmpp://eric@fliptrack.com:password"); This is a google apps account (not hosted on fliptrack.com)
Hello,
I checked the code in the example but it returns the following error: ------------------------------------ Warning: dl() [function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/phurple.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/phurple.so: cannot open shared object file: No such file or directory in localhost/phurple/index.php on line 5 Fatal error: Class 'PhurpleClient' not found in localhost/phurple/index.php on line 14 ----------------------------------- I have checked and the file "phurple.so" is not vailable on my server. But pidgin is installed on my machine. From where I can download phurple.so ?
Hi..
Thanks a lot for phurple. It looks great. Everything seems to be working perfectly. Though, I'd like to know if i'm still connected to the IM Network or if I've successfully connect to the network? Is there any easy way to do this??
Please let know are you ableto send messages to AIM and ICQ ? am not able to send im to AIM and ICQ
all others are working fine any idea?
While Installing PHURPLE I am getting error
"purple files in default path... not found", I am using fedoracode, and I have copied files at /var/www/html/project/phruple2 B: I have used following command :- phpize && ./configure --enable-phurple && make && make install B: Output is :- Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc and cc understand -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib checking for PHP extension directory... /usr/lib/php/modules checking for PHP installed headers prefix... /usr/include/php checking for re2c... re2c checking for re2c version... 0.12.3 (ok) checking for gawk... gawk checking whether to enable phurple support... yes, shared checking for glib files in default path... found in /usr checking for g_hash_table_new in -lglib-2.0... yes checking for purple files in default path... not found configure: error: Please reinstall the phurple distribution
you seem not to have the libpurple dev package installed on your system
Now I am not getting this error I installed pidgin (libpurple),
after installing phurple I executed this command phpize && ./configure --enable-phurple && make ist getting installed but when I am testing, phurple is not loaded and phurple.so is not found anywhere on the machine
Hi Anatoliy,
how to get certificates/x509/tls_peers my test script not able to send IM. What can be reason for this? it only shows "my heartbeat" from above script. Which OS you suggest for successful testing. My server info Libpurple 2.5.2 CentOs php 5.1.6 Thanks in advance
hi Max,
you don't need to get certs, but starting with at least 2.5.2 unknown certs must be accepted manually by user. There is no functionality yet to do this with phurple. As i've expierienced, libpurple itself passes after a timeout. Hm, you could try 2.5.4, it was working without timeout for me. regards
I installed phpurple-0.3.0-alpha on my server. but not able to create instance of class PurpleClient by using getInstance(). Method. In this version some fuctions working and some not.eg getProtocol works fine. This is loaded as default:
Again i tried new version phpurple-0.4.0-alpha here again i am not able to create instance of classes. this need to load using dl(); Please help. PHP Version 5.2.4
Please, can anybody help me with compiling on Ubuntu 8.10?
When trying getting this error, where somthing about PCRE missing. I tried to install all the pcre parts, but still no lucky... What's wrong? .... checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating ./config.status config.status: creating config.h config.status: config.h is unchanged config.status: executing libtool commands /bin/bash /home/kok/Plocha/phurple-0.4.0-alpha/libtool --mode=compile gcc -I. -I/home/kok/Plocha/phurple-0.4.0-alpha -DPHP_ATOM_INC -I/home/kok/Plocha/phurple-0.4.0-alpha/include -I/home/kok/Plocha/phurple-0.4.0-alpha/main -I/home/kok/Plocha/phurple-0.4.0-alpha -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libpurple -DHAVE_CONFIG_H -g -O2 -c /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c -o phurple.lo libtool: compile: gcc -I. -I/home/kok/Plocha/phurple-0.4.0-alpha -DPHP_ATOM_INC -I/home/kok/Plocha/phurple-0.4.0-alpha/include -I/home/kok/Plocha/phurple-0.4.0-alpha/main -I/home/kok/Plocha/phurple-0.4.0-alpha -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libpurple -DHAVE_CONFIG_H -g -O2 -c /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c -fPIC -DPIC -o .libs/phurple.o /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c:27:31: error: pcre/pcrelib/pcre.h: No such file or directory /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c: In function ‘zim_PhurpleClient_addAccount’: /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c:629: error: ‘pcre’ undeclared (first use in this function) /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c:629: error: (Each undeclared identifier is reported only once /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c:629: error: for each function it appears in.) /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c:629: error: ‘re’ undeclared (first use in this function) /home/kok/Plocha/phurple-0.4.0-alpha/phurple.c:651: error: ‘PCRE_ERROR_NOMATCH’ undeclared (first use in this function) make: *** [phurple.lo] Error 1
I'm using ubuntu 8.04 and the path is just 'pcre.h' instead of 'pcre/pcrelib/pcre.h'
Edit the phurple.c and re-make. Cheers
you need:
sudo apt-get install libpcre3-dev then Edit the phurple.c: change line 27 #include to #include
Please let know are you ableto send messages to AIM and ICQ ? am not able to send im to AIM and ICQ
all others are working fine any idea? -- Through pidgin GUI client messages are sent to AIM and ICQ .
I configured library on my Ubuntu 8.04 server its working perfectly excepts for AIM and ICQ ... am able to login both AIM and ICQ but messages are not delevered i have phurple-0.4.0 and libpurple 2.5.4 any idea?
Hi, I am using the same lib files to connect my yahoo, ICQ IMs. But its not working for me. I am getting some error while connecting yahoo & ICQ. I have given the connection string like below
yahoo://:murugesan:myyahoopassword icq://:murugesan:myicqpassword. can you please tell me whats wrong on this account settings?. MSN and gtalk are working with this code. - Murugesan
Ok, I've compiled libpurple 2.5.4 and phurple 0.4.0 alpha.
Account: yahoo://:@scs.msg.yahoo.com:5050 Tested with YM okay.. Account: prpl-qq://:@sz2.tencent.com:8000 Tested with QQ not okay.. I test leaving the server and port empty, still not okay.. However, i try it with finch on the same server, and it works This is what I got.. (04:18:29) prefs: Reading /tmp/smsd_phurple/prefs.xml (04:18:29) prefs: Finished reading /tmp/smsd_phurple/prefs.xml (04:18:29) dbus: Failed to get connection: Failed to execute dbus-launch to autolaunch D-Bus session (04:18:29) plugins: probing /usr/local/lib/purple-2/libqq.so (04:18:29) plugins: probing /usr/local/lib/purple-2/ssl-gnutls.so (04:18:29) plugins: probing /usr/local/lib/purple-2/liboscar.so (04:18:29) plugins: /usr/local/lib/purple-2/liboscar.so is not usable because the 'purple_init_plugin' symbol could not be found. Does the plugin call the PURPLE_INIT_PLUGIN() macro? (04:18:29) plugins: probing /usr/local/lib/purple-2/libsimple.so (04:18:29) plugins: probing /usr/local/lib/purple-2/idle.so (04:18:29) plugins: probing /usr/local/lib/purple-2/statenotify.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libaim.so (04:18:29) plugins: probing /usr/local/lib/purple-2/ssl.so (04:18:29) plugins: probing /usr/local/lib/purple-2/dbus-example.so (04:18:29) plugins: probing /usr/local/lib/purple-2/buddynote.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libmyspace.so (04:18:29) plugins: probing /usr/local/lib/purple-2/log_reader.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libmsn.so (04:18:29) plugins: probing /usr/local/lib/purple-2/offlinemsg.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libgg.so (04:18:29) plugins: probing /usr/local/lib/purple-2/newline.so (04:18:29) plugins: probing /usr/local/lib/purple-2/autoaccept.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libirc.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libyahoo.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libxmpp.so (04:18:29) util: Reading file xmpp-caps.xml from directory /tmp/smsd_phurple (04:18:29) util: File /tmp/smsd_phurple/xmpp-caps.xml does not exist (this is not necessarily an error) (04:18:29) jabber: creating hash tables for data objects (04:18:29) plugins: probing /usr/local/lib/purple-2/joinpart.so (04:18:29) plugins: probing /usr/local/lib/purple-2/perl.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libjabber.so (04:18:29) plugins: /usr/local/lib/purple-2/libjabber.so is not usable because the 'purple_init_plugin' symbol could not be found. Does the plugin call the PURPLE_INIT_PLUGIN() macro? (04:18:29) plugins: probing /usr/local/lib/purple-2/libicq.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libzephyr.so (04:18:29) plugins: probing /usr/local/lib/purple-2/psychic.so (04:18:29) plugins: probing /usr/local/lib/purple-2/libnovell.so (04:18:29) prefs: /purple/status/scores/offline changed, scheduling save. (04:18:29) prefs: /purple/status/scores/available changed, scheduling save. (04:18:29) prefs: /purple/status/scores/invisible changed, scheduling save. (04:18:29) prefs: /purple/status/scores/away changed, scheduling save. (04:18:29) prefs: /purple/status/scores/extended_away changed, scheduling save. (04:18:29) prefs: /purple/status/scores/idle changed, scheduling save. (04:18:29) prefs: /purple/status/scores/offline_msg changed, scheduling save. (04:18:29) util: Reading file accounts.xml from directory /tmp/smsd_phurple (04:18:29) util: Reading file status.xml from directory /tmp/smsd_phurple (04:18:29) certificate: CertificateVerifier x509, singleuse requested but not found. (04:18:29) certificate: CertificateVerifier singleuse registered (04:18:29) certificate: CertificatePool x509, ca requested but not found. (04:18:29) certificate: CertificateScheme x509 requested but not found. (04:18:29) certificate/x509/ca: Lazy init failed because an X.509 Scheme is not yet registered. Maybe it will be better later. (04:18:29) certificate/x509/ca: Init failed, probably because a dependency is not yet registered. It has been deferred to later. (04:18:29) certificate: CertificatePool ca registered (04:18:29) certificate: CertificatePool x509, tls_peers requested but not found. (04:18:29) certificate: CertificatePool tls_peers registered (04:18:29) certificate: CertificateVerifier x509, tls_cached requested but not found. (04:18:29) certificate: CertificateVerifier tls_cached registered (04:18:29) prefs: /purple/logging/format changed, scheduling save. (04:18:29) prefs: /purple/logging/format changed, scheduling save. (04:18:29) prefs: /purple/proxy/type changed, scheduling save. (04:18:29) prefs: /purple/proxy/host changed, scheduling save. (04:18:29) prefs: /purple/proxy/port changed, scheduling save. (04:18:29) prefs: /purple/proxy/username changed, scheduling save. (04:18:29) prefs: /purple/proxy/password changed, scheduling save. (04:18:29) certificate: CertificateScheme x509 requested but not found. (04:18:29) certificate: CertificateScheme x509 registered (04:18:29) util: Reading file smileys.xml from directory /tmp/smsd_phurple (04:18:29) util: File /tmp/smsd_phurple/smileys.xml does not exist (this is not necessarily an error) (04:18:29) stun: using server (04:18:29) util: Reading file blist.xml from directory /tmp/smsd_phurple (04:18:29) prefs: Reading /tmp/smsd_phurple/prefs.xml (04:18:29) prefs: Finished reading /tmp/smsd_phurple/prefs.xml (04:18:29) prefs: /purple/savedstatus/default changed, scheduling save. (04:18:35) util: Writing file prefs.xml to directory /tmp/smsd_phurple (04:18:35) util: Writing file /tmp/smsd_phurple/prefs.xml (04:18:35) util: Writing file status.xml to directory /tmp/smsd_phurple (04:18:35) util: Writing file /tmp/smsd_phurple/status.xml (04:18:35) util: Writing file accounts.xml to directory /tmp/smsd_phurple (04:18:35) util: Writing file /tmp/smsd_phurple/accounts.xml (04:18:35) util: Writing file blist.xml to directory /tmp/smsd_phurple (04:18:35) util: Writing file /tmp/smsd_phurple/blist.xml == Hangs here until I press CTRL-C == (04:22:31) sighandler: Caught signal 2 (04:22:31) plugins: Unloading plugin AIM (04:22:31) plugins: Unloading plugin GNUTLS (04:22:31) certificate: CertificateScheme x509 unregistered (04:22:31) plugins: Unloading plugin Gadu-Gadu (04:22:31) plugins: Unloading plugin GroupWise (04:22:31) plugins: Unloading plugin ICQ (04:22:31) plugins: Unloading plugin IRC (04:22:31) plugins: Unloading plugin MSN (04:22:31) plugins: Unloading plugin MySpaceIM (04:22:31) plugins: Unloading plugin Perl Plugin Loader (04:22:31) plugins: Unloading plugin QQ (04:22:31) plugins: Unloading plugin SIMPLE (04:22:31) plugins: Unloading plugin SSL (04:22:31) plugins: Unloading plugin XMPP (04:22:31) jabber: destroying hash tables for data objects (04:22:31) plugins: Unloading plugin Yahoo (04:22:31) plugins: Unloading plugin Zephyr Any help appreciated
My bad..
So the protocol is qq not prpl-qq.. Sorry for the trouble.. Works perfectly now.. Thanks again
Please let know are you ableto send messages to AIM and ICQ ? am not able to send im to AIM and ICQ
all others are working fine any idea?
Hm.. dunno, I don't have AIM or ICQ account.
You should first test with finch or pidgin first, see if it is libpurple problem or not
Hi,
aim and icq do work the same way as any other protocol. No need to do something special. Just be sure your accounts are authorized to each other. Regards, Anatoliy
Thanks for reply.. "your accounts are authorized to each other" can you explain what this means also is sending messages to AIM and ICQ working at your end?
Hi
I am developing a site and for this site i am planning to integrate All the IM chat using. I came to know that using Lib Purple i can achieve this. I am developing my site in PHP. Seems like Lib Purple files are in C/C++. So i am wondering how i can convert this into php and also i need to run the same in Web Browsers. Could you please help me out in completing this functionality. Looking forward for your very valuable reply, Thanks in Advance,
Hi
I am using this lib purple to integrate the all Messengers in the web. So i have installed and configured in my server and it's working fine. I can able to send and receive the message for all IM Networks. I have read the purple documentation and used the PhurpleBuddy::isOnline method to check the whether the buddy is in online or not. But it's not working . Now i wondering to know the method name to display the Online Buddy list for all the IM networks. And also i have tried to display the chat messages in the User Interface for that i am not able to get the post data in the following class class CustomPhurpleClient extends PhurpleClient can any one help to achieve the above things. Looking forward for the reply. Thanks in advance.
Hi,
Can you help me as you said "I can able to send and receive the message for all IM Networks." are you able to send IM to AIM & ICQ ? if yes please tell me your server os version and PHP ver. Thanks,
Hi Abhi ,
I have tried for Gmail,Yahoo,MSN,AIM and MySpace only. I have not tried ICQ messenger. You can pass the username and password for the addaccount method . see the code below: $client->addAccount("AIM:/username:password"); Don't give full email address. you just give username is enough ex: abcdef@aol.com $client->addAccount("AIM:/abcdef:password"); Linux OS Verion: FC8 PHP version : 5.2.4
Hi,
I am looking to develop a PHP script which sends PMs to Yahoo and MSN IM buddies. I am currently using xampp(Windows XP) to run and test my PHP applications. Once the code base is ready it'll be shifted to the production server which runs on Linux. While googling I came across Pidgin and PHPurple. I downloaded both the packages and installed Pidgin. Now I am trying to install PHPurple on my system. However there is no dll available in the downloaded package. But there is libpurple.dll present in the root directory of Pidgin. I read this article to guide me with the installation procedure: http://phurple.rubay.de/installation.html In order to user PHPurple, I need to install the phurple extension. I have always used xampp to develop all my web applications, hence this bit is a little tricky me. I am not sure whether I should copy paste the libpurple.dll in the xampp\php\ext directory and enable it by adding the following line to my php.ini: extension= libpurple.dll and then restart my xampp service which should enable me to start working with PHPurple or is there something else I need to do. Can anyone help me out? ---sib.
Is there a way to set your status and see the statuses of other users on your buddy list with Phurple? I have Phurple up and running, but I really need to be able to do this. I would really appreciate some help...
I'd be rather keen on this too.
Only other way I can think of accomplishing this, without an internal callback feature, would be to track the buddy list file using PHP's FAM functionality (http://www.php.net/fam) monitoring changes within the file, then parsing it to a custom function thats perhaps tied into the heartbeat event of this class. Let me know if you come right.
Hi,
I am very much interested in this prj. I would like to know whether any dev progress on this prj? or any alternative lib which is having good community base. I am trying to suggest this library for one of my client I am not sure that it can be used to build something similar to meebo?? I'm open to other alternatives but PHP enlighten me.. -- P
Hi all , i've recently installed phurple and libpurple , both working ... purple library loads perfectly in php but now i have a problem ... i put the code from the top of this page in a php file but when i execute it from a browser it returns nothing ... no error no result no nothing ... can somebody tell me exactly what i have to write in the php file?
i'm not so good at php classes and probably i don't know how to initiate the class
After 18 hours I successfully built phurple.so under Leopard (Mac OS X). Works great so far.
I'll write a tutorial if enough people are interested.
Hi vinnie,
glad to hear that you made it. please share your exp
Yes please! I am on Mac OS X, using MAMP PRO, but I can't get Phurple to work, so a tutorial would be really nice!
I can't seem to find a function that returns all buddies that are online. I would like to avoid looping through the entire buddylist calling isonline() after each of them...
Suggestions?
Hi,
I am trying to install phurple and here is what I get: [derf@localhost Phurple]$ phpize && ./configure --enable-phurple && make Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20050922 Zend Extension Api No: 220051025 checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking whether gcc and cc understand -c and -o together... yes checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i686-redhat-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext checking for PHP extension directory... /usr/lib/php/modules checking for PHP installed headers prefix... /usr/include/php checking for re2c... no configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether to enable phurple support... yes, shared checking for glib files in default path... not found configure: error: Please reinstall the glib distribution I reinstalled it and again the same message. Any Idea please? Derf
Simple..
U need to install glib-dev package. Use yum on redhat base distro and apt-get on debian based distro.
Hi,
Thanks a lot, I tryed with the example above. I added #extension=phurple.so in php.ini and used the command : # php /var/www/cgi-bin/test.cphp to run it. It worked fine! However, one of my friend tried doing exactly the same and got php crashed # php /var/www/cgi-bin/test.cphp Aborted with Valgrind the output was: [root@localhost phurple-0.4.0-alpha]# valgrind php /var/www/cgi-bin/test.cphp ==19591== Memcheck, a memory error detector. ==19591== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==19591== Using LibVEX rev 1658, a library for dynamic binary translation. ==19591== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==19591== Using valgrind-3.2.1, a dynamic binary instrumentation framework. ==19591== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==19591== For more details, rerun with: -v ==19591== ==19591== Invalid read of size 4 ==19591== at 0x820D59D: zend_object_store_get_object (in /usr/bin/php) ==19591== by 0x8219EE7: (within /usr/bin/php) ==19591== by 0x820EFB8: execute (in /usr/bin/php) ==19591== by 0x81F15C1: zend_execute_scripts (in /usr/bin/php) ==19591== by 0x81B1F70: php_execute_script (in /usr/bin/php) ==19591== by 0x826E464: main (in /usr/bin/php) ==19591== Address 0x4061064 is 25,316 bytes inside a block of size 262,144 free'd ==19591== at 0x4004FDA: free (vg_replace_malloc.c:233) ==19591== by 0x81D8D87: zend_mm_shutdown (in /usr/bin/php) ==19591== by 0x81D8EA0: shutdown_memory_manager (in /usr/bin/php) ==19591== by 0x81B0841: php_module_startup (in /usr/bin/php) ==19591== by 0x826CC20: (within /usr/bin/php) ==19591== by 0x826D33D: main (in /usr/bin/php) (16:31:53) prefs: Reading /tmp/phurple-test/prefs.xml (16:31:54) prefs: Finished reading /tmp/phurple-test/prefs.xml ==19592== ==19592== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 216 from 1) ==19592== malloc/free: in use at exit: 7,468,891 bytes in 153,657 blocks. ==19592== malloc/free: 201,365 allocs, 47,708 frees, 15,438,370 bytes allocated. ==19592== For counts of detected errors, rerun with: -v ==19592== searching for pointers to 153,657 not-freed blocks. ==19592== checked 7,050,216 bytes. ==19592== ==19592== LEAK SUMMARY: ==19592== definitely lost: 68 bytes in 2 blocks. ==19592== possibly lost: 1,544 bytes in 23 blocks. ==19592== still reachable: 7,467,279 bytes in 153,632 blocks. ==19592== suppressed: 0 bytes in 0 blocks. ==19592== Use --leak-check=full to see details of leaked memory. (16:31:55) dbus: Failed to get connection: Failed to execute dbus-launch to autolaunch D-Bus session (16:31:55) plugins: probing /usr/lib/purple-2/libqq.so ... Then he removed the line #extension=phurple.so in php.ini and it worked fine. Do you have an idea on why php got crashed and for my friend only, not for me? Also, I would like to understand why we can use Phurple with CGI only.
HI, i tried to install phurple..everything worked fine including loading of the extensio. purple.so and not phurple.so...but when i tried to make the above example work..i got thrown by an error..someone who has ccome across such a situation..please do let me know a solution for this
[root@localhost phpurple]# php test.php PHP Warning: dl(): purple: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20090626 These options need to match in /root/phpurple/test.php on line 8 noPHP Warning: dl(): purple: Unable to initialize module Module compiled with module API=20050922 PHP compiled with module API=20090626 These options need to match in /root/phpurple/test.php on line 13 yesPHP Fatal error: Class 'PhurpleClient' not found in /root/phpurple/test.php on line 25 There is some clue in here "Module compiled with module API=20050922 PHP compiled with module API=20090626" can someone suggest a best solution for this...thanks in advance...
Hey All!
Any news regarding windows platform? btw, great great product, I'm a true PHP lover and because of unavailability of some good example/open-source project in PHP for web-based messengers like meebo, I was about to move to Java platform for using http://soashable.com/ suddenly Captain Phurple jumps in and save my life :p problem here is I'm not familiar with linux installation/administration, but coz ov phurple m going to install Ubuntu (as my brother said its much easier)...*sigh* in short, I will love to hear one day if someone can provide windows support for Phurple...
I am using FC12, during make it stops with error pcre.h not found. i have installed all packages via yum. and PCRE. H is located in /usr/include/pcre.h
Just open the phurple.c and remove the path on the line including the pcre.h =>
That worked for me.
Hi !
I wonder that how you can get friends list by phpurple ??? I find in document API and any anwser. Please help me (How I can get friend list by using phpurple) Thanks !
Hello,
We have successfully installed Phurple now we are getting error to create blist.xml file... Please suggest why blist.xml not working ? # php /var/www/html/phpurple/msn.php Log file: http://www.slideshare.net/sandeepverma/blist Thanks for understanding...
Hey !
I really needed a php thing that can interact with libpurple and here it is However i'm having some troubles. I can't figure out how to send messages to a buddy, basically i want to start the conversation. What i have so far is just a listener. If someone writes to the logged in account I reply with $conv->sendIM and it works. But what do i do if i just want to start the script and send batches of messages to the people in my list at certain intervals ? Hope this is possible ! Cristi
I used to get error when starting apache (while trying to load the phurple.so module):
========= PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phurple.so' - /usr/lib/php/modules/phurple.so: undefined symbol: ZVAL_ADDREF in Unknown on line 0 ========== I "fixed" that by commenting out the line containing ZVAL_ADDREF in client.c: ============= } else { //ZVAL_ADDREF(PHURPLE_G(phurple_client_obj)); } =========== Then apache finally loaded the module My specs: apache v2.2.16 php v5.3.3 phurple-0.4.1-alpha Fedora 14 That's probably not a good fix. It'd be great if Anatoliy could get a fix out. |
CategoriesQuicksearchArchives |