Results 1 to 14 of 14

Thread: Pass Parameters to a Web Page

  1. #1

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Pass Parameters to a Web Page

    Hi,
    Does any one know of how to pass a parameter to a web page in VB. i want to pass some info, i.e uname and password, current time etc to a php web page, the web page will also give back a response when the info has been passed. i need Vb to capture the info that has been returned..

    Thanks
    Peny wise pound Foolish

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Pass Parameters to a Web Page

    What method are you using, Winsock control/class, Inet control, Webbrowser control... ?

    To pass parameters to a php page usually you do this:
    Code:
    http://www.mysite.com/phppage.php?field1=something&field2=something

  3. #3

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Re: Pass Parameters to a Web Page

    I want to use inet...

    Which is the most efficient to use, coz i am developing a bulk sms software that should be a ble to pass at least 100 text message per second to the web page script that will do the sending of the messages.
    Peny wise pound Foolish

  4. #4
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049

    Re: Pass Parameters to a Web Page

    I'm gonna be crude here and suspect you are using an Inet browser control...

    To send data:
    VB Code:
    1. InetObject.Navigate "http://www.mysite.com/phppage.php?field1=" & something & "&field2=" & something2

    On event Document_Complete you can do:
    VB Code:
    1. dim strHTML as string
    2.  
    3.  if not InetObject.Document is nothing then
    4.      strHTML = InetObject.Document.Body.Innerhtml
    5.  end if
    6.  
    7.  if strHTML <> "" then
    8.     ' Do whatever you please with strHTML
    9.  end if

    If you are not using Inet control.. well then this example might be completely useless

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Pass Parameters to a Web Page

    Quote Originally Posted by Paradox
    Which is the most efficient to use, coz i am developing a bulk sms software that should be a ble to pass at least 100 text message per second to the web page script that will do the sending of the messages.
    3 questions:
    - Can't you do the bulk sending from the server?
    - Are all the messages the same?
    - What is the purpose of this bulk messaging?

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Pass Parameters to a Web Page

    Quote Originally Posted by Devion
    I'm gonna be crude here and suspect you are using an Inet browser control...

    To send data:
    VB Code:
    1. InetObject.Navigate "http://www.mysite.com/phppage.php?field1=" & something & "&field2=" & something2

    On event Document_Complete you can do:
    VB Code:
    1. dim strHTML as string
    2.  
    3.  if not InetObject.Document is nothing then
    4.      strHTML = InetObject.Document.Body.Innerhtml
    5.  end if
    6.  
    7.  if strHTML <> "" then
    8.     ' Do whatever you please with strHTML
    9.  end if

    If you are not using Inet control.. well then this example might be completely useless
    The last time I checked the Inet control doesnt have a navigate method, I firmly believe you meant the Webbrowser control...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Re: Pass Parameters to a Web Page

    3 questions:
    - Can't you do the bulk sending from the server?

    A Client will use the application to do type the mesage that is to be sent from whatever location they are and on the application i'm developing.so they must have an internet connection, so sending from the server is ruled out.

    - Are all the messages the same?
    Yes all the messages are the same. used for sending personalized greetings to company clients.

    - What is the purpose of this bulk messaging?
    send alerts to a large group of people in a short time as compared to doing the same either from your phone or a Modem which is quite slow.
    Peny wise pound Foolish

  8. #8
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Pass Parameters to a Web Page

    I see. Do you have access to the server side code? I ask because there is probably a quicker way of sending the message than PHP parameters.

    Also, if the messages are exactly the same, you only need to send them to the server once.

  9. #9

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Re: Pass Parameters to a Web Page

    Yes i wrote the php script? wanna view it?
    Peny wise pound Foolish

  10. #10
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Pass Parameters to a Web Page

    Not really. I don't know any PHP

    Does it have to be php? Can't you use a sort of direct transfer? Then you could use the Winsock control. It would be quicker.

  11. #11
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049

    Re: Pass Parameters to a Web Page

    Quote Originally Posted by dee-u
    The last time I checked the Inet control doesnt have a navigate method, I firmly believe you meant the Webbrowser control...
    My bad

  12. #12

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Re: Pass Parameters to a Web Page

    I have managed to pass the params, now only have to figure out how to multithread the application so that its able to send multiple messages.

    Now my other question can VB create a Multi thread application.
    and how can i get the response passed from a web page to my app?
    Peny wise pound Foolish

  13. #13
    Frenzied Member Devion's Avatar
    Join Date
    Sep 2000
    Location
    The Netherlands
    Posts
    1,049

    Re: Pass Parameters to a Web Page

    VB can do multithreads... It's just a little bit of a pain in the buttocks

  14. #14

    Thread Starter
    Addicted Member Paradox's Avatar
    Join Date
    Sep 2004
    Location
    Nairobi
    Posts
    189

    Re: Pass Parameters to a Web Page

    Does any one know how to read a parameter that has been passed from a web page. i am using the inet control?
    Peny wise pound Foolish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width