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

    #16
    Re: hostavailable - always .T.

    Originally posted by MikeC View Post
    Now try gghhii.com, pennifig.com, or calocklin.com and they all come up as false.
    Code:
    ?hostavailable("gghhii.com")
    = .T.
    ?hostavailable("pennifig.com")
    = .T.
    ?hostavailable("calocklin.com")
    = .T.
    It all has to do with which browser is your default one and what it does.

    Cal:
    404 means page not available and that's is the only number you need to test for as it indicates whether you did or did not connect to the desired web page.

    Comment


      #17
      Re: hostavailable - always .T.

      Originally posted by ChrisHawkes View Post
      Hi Cal

      Can you try www.crapaholictest.com with the function I supplied (not an IP address), and if the function returns "Success" then you have a firewall problem. You should get the response 'Destination Protocol Unreachable'. Some firewalls, even when turned off will still default to IP address 127.0.0.1 and will still produce a successful result. Sometimes the opposite is true; this is why Hostavailable() didn't work for my client at the time.

      The function I supplied is based on the ping status.
      load_library( "E:\a5stuff\HostavailableReplacement.aex")
      ?internetconnectionstatus("www.crapaholictest.com?")
      = "Success"

      And I turned my Windows firewall is off and I don't have any other firewalls - except the router if you want to consider that.

      I wonder if there is some relation between this and the problems I'm having with email in Vista??

      Later - I think I'll try this later with the router unplugged and see what happens.
      Last edited by CALocklin; 04-09-2009, 12:01 PM.

      Comment


        #18
        Re: hostavailable - always .T.

        Originally posted by G Gabriel View Post
        404 means page not available and that's is the only number you need to test for as it indicates whether you did or did not connect to the desired web page.
        So you're telling me there really is a page called www.googlex.com?
        Last edited by CALocklin; 04-09-2009, 12:03 PM.

        Comment


          #19
          Re: hostavailable - always .T.

          Originally posted by CALocklin View Post
          www.googlexzq.com[/URL] returned a 404.
          There is no such website, checked with IE & Firefox.

          Comment


            #20
            Re: hostavailable - always .T.

            Originally posted by CALocklin View Post
            I also got a 301 response (moved permanently?) to www.googlex.com when it sent me to some other site that offered me some related options.
            This website does exist (redirected to another) hence you got 301 (not 404).

            Comment


              #21
              Re: hostavailable - always .T.

              Cal, what happens if you use a browser to go to http://nosuchhost

              It sounds like something on your machine, the local network, or on your ISPs network is always sending back some kind of response, even on invalid URLs. Adware/malware/viruses often do this. Also some router manufacturers and ISPs do this to generate advertising revenue.

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

              Comment


                #22
                Re: hostavailable - always .T.

                Gabe, 404 means the server responded but the specific page requested was not found. So for these purposes, a 404 would indicate that the host IS available. In fact, if response.parsed_headers.status_code contains any value at all, then the server is available. Otherwise you would get no response at all from the server and .error_code will be non-zero.
                Code:
                resp=http_get("http://nosuchhost")
                ?resp
                = body = 
                error_code = 16030
                error_text = WSAHOST_NOT_FOUND - Host not found while getting host name..
                
                Detailed Description:
                No such host is known. The name is not an official host name or alias,
                or it cannot be found in the database(s) being queried.
                This error may also be returned for protocol and service queries,
                and means that the specified name could not be found in the relevant database.
                
                headers = ""
                +parsed_headers.
                
                'there is no parsed_headers.status_code because no headers came back from the non-existent server
                ?resp.parsed_headers
                = <Has no sub-properties>
                
                'compare to a valid host
                ?http_get("http://www.google.com").error_code
                = 0

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

                Comment


                  #23
                  Re: hostavailable - always .T.

                  You're right. I have to turn my head around. Instead of thinking, "Did I get a good connection to the page?", I just have to think in terms of, "Is the page there?"

                  On the other hand, most of the pages I'll be checking for should only return 200 or, for some reason that makes no sense to me right now, 302.

                  EDIT: And now I see Lenny's info that throws another more questions into the pot.

                  Comment


                    #24
                    Re: hostavailable - always .T.

                    Originally posted by CALocklin View Post
                    On the other hand, most of the pages I'll be checking for should only return 200 or, for some reason that makes no sense to me right now, 302.
                    If testing against a non-current V9 Alpha Application Server, and your test request does not include a session ID, the server generates a new session ID and issues a 302 to indicate that the request should be repeated, but with the new session ID included on the second request.

                    This behavior was changed as of V9 build 1836-3213 and the redirect should no longer be forced if the initial request does not include a session ID.

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

                    Comment


                      #25
                      Re: hostavailable - always .T.

                      Originally posted by Lenny Forziati View Post
                      Gabe, 404 means the server responded but the specific page requested was not found. So for these purposes, a 404 would indicate that the host IS available. In fact, if response.parsed_headers.status_code contains any value at all, then the server is available. Otherwise you would get no response at all from the server and .error_code will be non-zero.
                      Code:
                      resp=http_get("http://nosuchhost")
                      ?resp
                      = body = 
                      error_code = 16030
                      error_text = WSAHOST_NOT_FOUND - Host not found while getting host name..
                       
                      Detailed Description:
                      No such host is known. The name is not an official host name or alias,
                      or it cannot be found in the database(s) being queried.
                      This error may also be returned for protocol and service queries,
                      and means that the specified name could not be found in the relevant database.
                       
                      headers = ""
                      +parsed_headers.
                       
                      'there is no parsed_headers.status_code because no headers came back from the non-existent server
                      ?resp.parsed_headers
                      = <Has no sub-properties>
                       
                      'compare to a valid host
                      ?http_get("http://www.google.com").error_code
                      = 0
                      Lenny,

                      I tried this with resp=http_get("http://www.rptrackerxqsyt.com") and got a 404 code.

                      Then I tried it with resp=http_get("http://www.rptrackerxqsyt") and got a 404 code.

                      Then I tried it with resp=http_get("http://asdf.rptrackerxqsyt") and got a 404 code.

                      Then I tried it with resp=http_get("http://rptrackerxqsyt") and got your "not available" message.

                      It seems that anytime there is a 'dot' in the name, it returns a 404 code. At least it does on my machine.

                      Comment


                        #26
                        Re: hostavailable - always .T.

                        http_get() is muddying the water. It is a far more complex test than host_available. Have you tested these hostnames in a browser yet to see if you get an actual page instead of the built-in browser error message?

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

                        Comment


                          #27
                          Re: hostavailable - always .T.

                          Originally posted by Lenny Forziati View Post
                          If testing against a non-current V9 Alpha Application Server, and your test request does not include a session ID, the server generates a new session ID and issues a 302 to indicate that the request should be repeated, but with the new session ID included on the second request.

                          This behavior was changed as of V9 build 1836-3213 and the redirect should no longer be forced if the initial request does not include a session ID.
                          Thanks. My WAS isn't current because it works and I hate to change from something that works when about 8 customers are relying on it.

                          Comment


                            #28
                            Re: hostavailable - always .T.

                            Originally posted by Lenny Forziati View Post
                            http_get() is muddying the water. It is a far more complex test than host_available. Have you tested these hostnames in a browser yet to see if you get an actual page instead of the built-in browser error message?
                            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.
                            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.

                            Comment


                              #29
                              Re: hostavailable - always .T.

                              Originally posted by Lenny Forziati View Post
                              Gabe, 404 means the server responded but the specific page requested was not found. So for these purposes, a 404 would indicate that the host IS available.
                              Lenny:
                              Yes.. I agree, but I think what Cal is trying to do is to make sure he connected to a CERTAIN page or site as opposed to test whether the server is merely available.

                              Comment


                                #30
                                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]
                                Cal:
                                That's what I was saying all a long: the webpage you are seeking does not exist but your host takes you to a default page (some browsers will do that when they can't locate the URL, others like IE will take you to google.com). But if you use the script I posted, you get 404.

                                Comment

                                Working...
                                X