Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8568201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:03:31+00:00 2026-06-11T18:03:31+00:00

I have an app that needs to access a local WAMP server in order

  • 0

I have an app that needs to access a local WAMP server in order to be served by a PHP script, but only when the USB cable is plugged in. The app needs to operate completely offline. I have researched using USB tunneling and such but so far there is no clean and simple solution. Perhaps I am looking too far and wide for a solution?

The end result for this project is that I need to copy a database from the WAMP server to the devices database. I plan on feeding it a JSON-parseable string via the PHP script.

I am trying to achieve this with XHR:

var url = "http://10.0.2.2:8080/home/yey.php";
    var xhr = Ti.Network.createHTTPClient({
        onload: function(e){
            alert(this.responseText);
        },
        onerror: function(e){
            alert(e.error);
        },
        timeout: 5000
    });

xhr.open("GET", url);
xhr.send();

Other IP addresses I have tried are:

192.168.0.1
127.0.0.1
10.0.2.2
// My PC's IP

// and ports
8888
80
8080

I am currently using easyPHP for development but the final product will run on a dedicated server box.

Is there any other way for Titanium to access a php script hosted locally?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:03:32+00:00Added an answer on June 11, 2026 at 6:03 pm

    You can access files with the specified IP addresses only when you use the emulator. Not on the device.

    If you want to use the device, you will need to specify the actual IP address of your computer. I guess you know how to find your IP address locally right?

    If your router is 192.168.0.1, then usually your machine will have something else instead of the 1

    • 10.0.2.2 is the parent machine (thus, in emulator, the computer running the emulator)
    • 192.168.0.1 is most likely your router
    • 127.0.0.1 is the device itself

    This will work locally, but not specifically for usb. Why do you need that anyways?

    The port to use depends totally on the setup of your apache on your computer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a simple web app in PHP that needs to have write access
We have an app that needs to access network resources. It's written in VB.Net.
I have an app that needs to gain access to a user's friends' information.
I have an app that needs to read a PDF file from the file
I have an app that needs to be able use either an sqlite3 datebase
I have an app that needs backgrounds for both parts of the split view.
I have a Rails app that needs to expose values from a database as
I have a wpf app that needs to communicate(exchange data) with a custom designed
I have an app that has a bunch of Core Data that it needs
I have a MySQL/Rails app that needs search. Here's some info about the data:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.