Hi,
Sorry I didn’t include any code in my last message. I was on my iPhone, moving between modes of transportation. 
Try this code. I rewrote some of the stuff in your code:
local http = require("socket.http")
local ltn12 = require("ltn12")
--the url needed a forward slash ( / ) after unicornlabs.com
myUrl = "http://ws.unicornlabs.com/?hk=9871&appId=1350&udid=000&service=launchAd"
--native.setActivityIndicator(true)
local path = system.pathForFile( "mos.content", system.DocumentsDirectory )
local myFile = io.open( path, "w+b" )
--Check for a connection to the host
r, c, h = http.request{
method = "HEAD",
url = myUrl
}
local hostFound = false
if c == 200 then
print("host found!")
hostFound = true
else
print("host not found")
end
--If a connection with the host was found, get the content
if hostFound then
http.request{
url = myUrl,
sink = ltn12.sink.file(myFile)
-- sink = ltn12.sink.file(io.stdout)
}
--Open the file containing the content we received
local file = io.open(path, "r")
local content = file:read("\*a")
--Show the content in the terminal
print(content)
--Show the content
native.showAlert(content,content)
end
I added a few lines to check the page headers just to see if a connection to the host was made. If a connection is made, then the script can go on and get the content. It gets the content, puts it in a file (which is what sink does in the http.request), and then it reads the content from the file and shows it in the alert.
Notice I also commented out activity indicator. If you look at the documentation, API Reference p.42, you’ll notice that the activity indicator doesn’t actually come up until the end of your script. So I think it was coming up even after you made a connection and got your content and then it was not going away. A way to get this to work might be to use an event listener to initiate the connecting to the server and getting the content. This way the whole script can run first and then when it’s done the event listener kicks in the connection. See p.56 in the API Reference for some examples of event listeners.
Lastly, the content you’re grabbing from the web has html table tags, image tags, and other formatting. You won’t be able to display these in the alert. But you probably already know that.
Let me know if you need any more help with this.
-Gilbert
[import]uid: 5917 topic_id: 1109 reply_id: 2847[/import]