How do I run PHP scripts on Android?

Source: Internet
Author: User
Tags php cli
I am doing a spider program, but the amount of data is very large, the initial calculation if all climbed up to two months of time, (five processes at the same time, and then more slowly), if directly with the notebook, too much electricity, so consider using mobile phones, but because no contact with Android, So I want to write PHP script to run on Android, I found most of the integrated server like AMP, do not provide the ability to run the script alone, PHP for Android provides the ability to run scripts, but now can not install, the last three years has not been updated, It's not possible to install a sl4a extension package from Google code that fails (I don't have a VPN), but the expansion pack can come down directly from Google code, but I don't know how to install it.
Does my God know how to solve this?

Reply content:

I am doing a spider program, but the amount of data is very large, the initial calculation if all climbed up to two months of time, (five processes at the same time, and then more slowly), if directly with the notebook, too much electricity, so consider using mobile phones, but because no contact with Android, So I want to write PHP script to run on Android, I found most of the integrated server like AMP, do not provide the ability to run the script alone, PHP for Android provides the ability to run scripts, but now can not install, the last three years has not been updated, It's not possible to install a sl4a extension package from Google code that fails (I don't have a VPN), but the expansion pack can come down directly from Google code, but I don't know how to install it.
Does my God know how to solve this?

There's a project called PFA PHP for Android
http://phpforandroid.net/

If you can't open it, turn over the wall.

Android is also the Linux kernel operating system, although the C library is not glibc, but on Linux with arm cross compiler such as ARM-NONE-LINUX-GNUEABI-GCC statically compiled PHP and other C programs, In theory, it can be ported to an arm-architected android system.

If you want to build your Android version of PHP on Linux, you can refer to the droidphp project.

If you want to use off-the-shelf, you can download cracked version ksweb.
Kslabs.ru developed Android apps Ksweb packaged php/mysql/nginx/lighttpd/msmtp/kswebftp and other components, Support for developing Web apps on Android phones. Using Ksweb to build a light mobile VPS on Android, when buying an Android phone can replace the Raspberry Pi as a personal server.

Or you can go directly to the 200 meta Raspberry Pi 2B, also arm architecture, the system is based on the Debian transformation of the RASPBIAN,CPU is Broadcom (Broadcom) BCM2709, the structure of the armv7l, four cores, the frequency of 900MHz, memory is 1GB, The source of the software can be used in domestic Zhong ke:
Https://lug.ustc.edu.cn/wiki/mirrors/help/raspbian

Add : I compiled my own phpdroid,5.7mb apk, built-in PHP and BusyBox.
Android apps can be developed based on PHP's built-in HTTP server and WebView.
The root directory of the website I adjust to SD card, you can put your PHP script directly to SD card.
You can use Popen to fork 5 processes to process crawl data.
The progress is then displayed in the PHP CLI HTTP server+webview.
Database can be used in PHP built-in SQLite.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.