Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

hostavailable - always .T.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Re: hostavailable - always .T.

    Originally posted by CALocklin View Post
    I wonder if my ISP (Charter) is doing this to me. Here's an example of what I often get in the browser when this happens.[ATTACH]20677[/ATTACH]
    And, to the best of my knowledge, I don't have any Yahoo toolbar, etc. on my system. That's not to say it isn't there but, if it is, I can't find it.
    Yes, that is exactly the problem! No matter what host you request, Charter is giving a valid HTTP response. Normally a connection to a non-existent host should fail. hostavailable() simply checks to see if a connection can be opened to the specified host, and Charter ensures that it always can be.

    In your case, you will need to try to detect something specific about the response that indicates it is one of these "helpful" pages instead of a response from the real server. I would examine the full headers and body of the response and see if you can find something unique enough. If all that you want to know is if the host is available, I recommend not just looking for a 404 status code because a mistyped page name or temporarily removed page could result in a 404 being sent back from the real server which is available. If you do want to really know that the specific page is available on the remote server, looking at the status code would be a good way to go. A status >= 400 indicates an error condition (page not found, permissions issue, server-side code error, etc.).

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

    Comment


      #32
      Re: hostavailable - always .T.

      It is not Charter or what ISP you use.. It's the BROWSER and how it resolves the URL.

      Comment


        #33
        Re: hostavailable - always .T.

        Cal,

        If you are trying to test that your server is available from your customers' system before you start a download could not create a simple html page that you fetch to make sure your customer has a good connection to your server.
        Code:
        ?http_get("www.alanderservices.com/testconnection.html").body
        = <html>
        <body>
        GOOD CONNECTION
        </body>
        </html>
        The page is still up in anyone wants to do testing
        Jeff Ryder

        Comment


          #34
          Re: hostavailable - always .T.

          Originally posted by Lenny Forziati View Post
          Yes, that is exactly the problem! No matter what host you request, Charter is giving a valid HTTP response. Normally a connection to a non-existent host should fail.

          In this case you, you will need to try to detect something specific about the response that indicates it is one of these "helpful" pages instead of a real response. I would examine the full headers and body of the response and see if you can find something unique enough. If all that you want to know is if the host is available, I recommend not just looking for a 404 status code because a mistyped page name or temporarily removed page could result in a 404 being sent back from the real server which is available.
          I think that clarifies it. For my purposes, the 404 should do the trick. In this case anyway. It's my own app that's trying to reach my own web page and I just want to know that it's up and running. If they can't get to my page, there's a problem.

          The big concern is for the future. I can build something to test special cases on my system or even for an individual customer. But, what happens for generic apps and for the customer who changes something without telling me? It doesn't look like there will be any easy answer to those issues.

          Since this seems to be done by the ISP, there's probably no hope but I'll ask anyway - anyone know of a way to turn the "feature" off?

          <rant>
          I'm really getting tired of stupid people. As a result of their stupidity, developers, engineers, and any other "creators" that you can think of try to make it easier for them. As a result, it often becomes more difficult for those of us who know what we are doing.

          By the way, Lenny. When are you guys going to fix/commonize all the places where I can get a list of fields for a table? Apparently somebody complained a long time ago and suggested that they should be alphabetized. So, most of them were alphabetized. Then I complained about not having the option to still see them in natural order and a few were made optional. As it is now, some are still ONLY available as alphabetized lists, some are only available in natural order, and some give you the option. For me, alphabetized is nice occasionally but most times I prefer the natural order. It's more common to have to fix something to do with the last field added to the table than it is to fix something to do with one of the original fields and I often don't remember the name of the last field - I just know it was the last field. It's also fairly common to group fields by "category" - such as all address info together. The use of alphabetic order has sometimes forced me into closing what I was doing, opening the table structure to find out the field name, then going back to what I was doing - a real PITA for me just to make someone else happy.

          This isn't the only place this type of thing has happened. I hope there will be more thought put into these kinds of things in the future. When someone suggests that "this would make it easier", think long and hard about whether or not it would make it easier for everyone. Maybe even do a quick survey here on the message board.
          </rant>

          Comment


            #35
            Re: hostavailable - always .T.

            Originally posted by CALocklin View Post
            Since this seems to be done by the ISP, there's probably no hope but I'll ask anyway - anyone know of a way to turn the "feature" off?
            Again.. it is not Charter, it's the browser. In Firefox you can check a box: Warn me when websites try to redirect.. but it does not seem to make any difference. IE probably has similar feature.

            Comment


              #36
              Re: hostavailable - always .T.

              Originally posted by G Gabriel View Post
              Again.. it is not Charter, it's the browser. In Firefox you can check a box: Warn me when websites try to redirect.. but it does not seem to make any difference. IE probably has similar feature.
              Gabe, I'm sorry but you are wrong. There is no browser involved when using hostavailable() or http_get(). The ISP is capturing DNS lookups and instead of returning a response indicating that there is no known IP address for the requested host name, it is returning a specific IP address for one of their servers. That server then answers all requests, regardless of which hostname you used.

              Lenny Forziati
              Vice President, Internet Products and Technical Services
              Alpha Software Corporation

              Comment


                #37
                Re: hostavailable - always .T.

                OK Lenny.. then how do you explain the fact that you get a different response when you use different browsers?

                Comment


                  #38
                  Re: hostavailable - always .T.

                  Cal

                  Try changing your DNS to a public DNS - Doing a bit of googling, Charter is known to cause this problem - something I had not thought of.

                  Try one of these public DNS servers:-

                  199.166.28.10 (PS0.NS2.VRX.NET) - Atlanta, Ga
                  199.166.29.3 (nl.public.rootfix.net) - Nederlands
                  199.166.31.3 (NS1.QUASAR.NET) - Orlando, FL, USA
                  204.57.55.100 (NS1.JERKY.NET) - Boston, MA, USA
                  199.5.157.128 (ASLAN.OPEN-RSC.ORG) - Detroit, MI, USA

                  P.S. OpenDNS also redirects to advertising pages.
                  If It Works First Time, There's Something Wrong!!!

                  Comment


                    #39
                    Re: hostavailable - always .T.

                    Cal:
                    Here is another idea, it seems to work but warrants more testing.
                    Code:
                    ?hostavailable("157.166.226.26")
                    = .T.
                    The above IP is that of cnn.com

                    What I am saying is, instead of testing the connection to your web page using the web page URL, use the actual IP of the page that way you avoid any improper DNS resolution.
                    P.S.:
                    If you do not know the IP of your page, post it here or send it to me and and I will give you the IP address.

                    Lenny:
                    Of course you are correct, but for the life of me I can't understand why when typing a phony address in Firefox it takes me to charter's default page, but when doing the same thing in IE it took me to google ! I thought perhaps DNS resolution occurs both at ISP as well as the browser level, or maybe the DNS was cached differently in IE. At any rate, I turned the computer off to completely clear the cache, turned it back on and Lo and Behold, both browsers now take me to the default charter's search page !!

                    Comment

                    Working...
                    X