I have an API built in PHP Codeigniter. I imported it into Eclipse for PHP Developers successfully but I have no Idea how to connect it to my Android App and an existing online PHP database.
I also tried extending it but the core classes in Codeigniter are not available in eclipse's (for PHP) code completion (e.g. on hitting ctrl + space while extending CI_ classes, options are expected to pop up but they don't).
What can I do to make it work. I tried looking around and found a question here but it has no answers, so I am stuck. Here is the question (in here) that I came across: connecting php codeigniter with android.
Thanks.
I just had to learn Codeigniter from scratch to solve my problem.
Related
I recently started on a project using Laravel and I'm curious to know that if I can consume Django web services on Laravel.
I tried searching google but all that came up were comparisons on it. I want to know if there are any struggles or issues when integrating a python api for php.
(ps. I'm clueless to a lot of these stuffs so am sorry if somethings aren't clear to me)
If you want to with your Django program from within Laravel there are 2 possible ways of doing this:
Guzzle, PHP HTTP client - This will allow you to get and posts from within PHP: http://docs.guzzlephp.org/en/stable/
The Symfony Process Component - which allows you to execute python code in from within PHP and get the anything that is returned: https://symfony.com/doc/current/components/process.html
I need to develop an module that interact with TFS for our internal office application, but the project is in php, i have done searching a lot, but could not find a sdk or api in php that could do the following.
listing the work items for a tfs user
creating / modifying work items.
View work item details and get attachments
modifying work items
can anybody suggest an api / sdk that could do the above said actions,
note: we are not interacting with Visual Studio Online, we are using hosted tfs in our own premises.
thanks in advance.
Use the Java SDK for TFS and the PHP/Java Bridge and then try something like this (psuedo code only)
<?php
require_once("java/Java.inc");
$tfsTPC=new java("com.microsoft.tfs.core.TFSTeamProjectCollection","http://tfs:8080/tfs/DefaultCollection");
$projects = $tfsTPC->getWorkItemClient()->getProjects();
?>
P.S. My PHP knowledge died a long time ago, so I'm not sure if the sample code is quite right, but hopefully you get the idea.
Also, even though it's the Java SDK you're using you should be able to follow all the C# samples since the SDK methods are almost identical between the .NET and Java SDKs
I'm using some open source code to launch a game. The game is old, around 11yrs. It is a tick based web based game. It's written in php and using MySQL. Basically I want to port this game to ios, instead of using uiwebview I want to build native controls.
I know that it's bad practice to communicate directly with MySQL from an ios app. So what I want to do is add a RESTful API. I'm new to this and have scoured google for answers, does anyone have any pointers of where to start when adding an API to an existing site? It's quite a complex structure.
Thanks.
Paul.
My suggestion is using a framework that is guided towards building an API. I use Slim Framework for my API back end and it's pretty easy to use. If you create a separate URL for this API or include directly into the PHP project as a class it could work.
Some tutorials to get you started are
Say Hello World with Slim
RESTful services with jQuery, PHP and the Slim Framework
Writing a RESTful Web Service with Slim
Hope this helps,
Wes
I have never used a PHP framework before and am considering using Symfony for my next one. However, I have already built an API which has all my main classes. I will therefore connect to this API using CURL. Can anyone advise on where to start with such a project. I am working through a Symfony tutorial but none of it seems to apply to what I need to do as I do not need to create database connections or classes as I will be building this project on my existing API.
If you don't need a lot of what you see in the Symfony tutorials you might be able to get away with Silex. Silex is a mini-framework with alot of the core aspects of Symfony, but without the extra stuff.
http://silex.sensiolabs.org/
I have been working on PHP application built using CodeIgniter framework, which needs to be deployed on client site. I want to protect php code by compiling it before deployment using Phalanger. For testing this I've created a demo project on CodeIgniter with just one function and controller. Now I just need to protect the controller/method I've created on the top of CodeIgniter while leaving rest of CodeIgniter as it is. I have tried several ways and also tried to find how to do it on google, but there isn't any good material on how to use Phalanger. Does any one had any success using Phalanger to obfuscate php code for deployment? Any tutorial or help will be good. Thanks
Phalanger allows compilation of PHP scripts into Multi Script Assemblies. However full obfuscation of generated DLL is a part of proprietary Phalanger extension which can be obtained from DEVSENSE support.