Source language: Translate to:

localhost problem

Questions and information about creating Internet aware NeoBook applications. Including PHP, HTML, FTP, HTTP, Email, etc.

Moderator: Neosoft Support

Postby Gaev » Fri Mar 05, 2010 1:39 pm

nix:

a) From your Browser (preferably Internet Explorer) ... can you type http://127.0.0.1/file.php in the Address Box and get a valid response ?

b) If so, try and create a WebBrowser object in your NeoBook Application and give it the same address as above ... see if the content of WebBrowser object is valid

c)
The server runs on the machine where application is run.

Just to be sure ... can you confirm that both your Application's exe file and the server are located on the same computer that you are typing/mousing on.

d)
Embedding images via http://localhost/image.jpg instead of C:\path_to_folder\image.jpg doesn't work either.

If you are attempting to specify a web address for the location of the file associated with a Picture object ... this will not work ... no matter what web address you specify ... as it does not support the http protocol.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: localhost problem

Postby dpayer » Mon Mar 08, 2010 10:11 am

nix wrote:Hi everyone. I just started testing neobook and have faced a problem.

I'm trying to make an application with flash games that make request to a local server.

The server runs on the machine where application is run. However, Neobook simply does not understand http://lolcalhost or http://127.0.0.1

This works
Code: Select all
InternetPost "http://somesite.com/file.php" "" "" ""


this doesn't
Code: Select all
InternetPost "http://localhost/file.php" "" "" ""


I see no logical explanation for this and I tried all possible approaches (using port numbers, ip addresses, server renaming), nothing works.

Embedding images via http://localhost/image.jpg instead of C:\path_to_folder\image.jpg doesn't work either.

Is this a bug or am I trying to do something that's not meant to be done?
Does anybody know if there's a way to achieve what I need?



Do you have an HTTP server on your machine that is responding to the localhost address? Otherwise, you are telling the app to use the hypertext transfer protocol (http) and there is nothing listening on port 80 on your machine for that request. By default, windows does not have a webserver running on the localhost IP. In fact, not all versions of windows has IIS built in.

This is a common problem when using Flash apps. They expect to use a server and http:// and NOT the file system (ie file://program files/my program/my data , etc.)

There are several webservers available as small applications. There is even a webserver made from PHP and the NewLISP scripting language can run a script that acts like a web server.

If you need to do cgi (php or asp or .pl, etc.) you will need to make sure your web server supports those file types and can exectute the proper interpreter.

David P
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to NeoBook and the Internet

Who is online

Users browsing this forum: No registered users and 0 guests