As title. If possible, is there any way to provide the PHP binding for this libtorrent?
Thanks.
Can't you call Python scripts with php?
Hi @Falcosc, I just want to use the single language for building my web application.
So I don't consider using the two languages to do my work. Even calling the external script files for my projects.
Thanks.
You could write a wrapper for the pythin calls in php. That would be alot more stable then a php extension becorse many people use the phython bindings which gives you a better quality of the interface.
At least you could start your project now and you don't have to wait 2-5 years untill there are no more more importand bugs to fix and no more more importand enhances to implement at libtorrent.
Or you could create a pull request for a php extension with libtorrent bindings.
I hope that did not disappoint you but the development schedule is already huge.
what kind of binding facilities does php have? can it call C APIs via FFI?
Hi @arvidn. it can be possible to call C APIs via FFI.
This additional extension is available from this link: https://pecl.php.net/package/ffi
Maybe you can consider using SWIG to make libtorrent bind the PHP ?
The MEGA SDK also do this.
Thanks.
jlibtorrent uses swig. I wonder how java specific those bindings are..
most of it is language neutral, but when it comes to listeners (directors) and typed indexes, it's very java specific. Also, there is another layer of pure java to have a more java-friendly API.
If you want to use libtorrent in a web environment, I think the best route is having a proper RPC interface, unless you only want to create/read torrents (and not perform actual transfers).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
Hi @Falcosc, I just want to use the single language for building my web application.
So I don't consider using the two languages to do my work. Even calling the external script files for my projects.
Thanks.