Automation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wescotte

    #1

    Automation

    I'm looking for resources on how to use PHP (or if there are better
    tools for this than PHP) to access a web page. Login, fill in some form
    data and send a file. Since our system generates all the data we upload
    via a automatic process I'm trying to eliminate the manual process of
    actually submitting the data. Any suggestions?

    Thanks
    Eric

  • Andy Hassall

    #2
    Re: Automation

    On 6 Jul 2005 12:35:12 -0700, "Wescotte" <wescotte@earth link.net> wrote:
    [color=blue]
    >I'm looking for resources on how to use PHP (or if there are better
    >tools for this than PHP) to access a web page. Login, fill in some form
    >data and send a file. Since our system generates all the data we upload
    >via a automatic process I'm trying to eliminate the manual process of
    >actually submitting the data. Any suggestions?[/color]

    Sounds like a job for Perl's WWW:Mechanize?

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • Daniel Tryba

      #3
      Re: Automation

      Wescotte <wescotte@earth link.net> wrote:[color=blue]
      > I'm looking for resources on how to use PHP (or if there are better
      > tools for this than PHP) to access a web page. Login, fill in some form
      > data and send a file. Since our system generates all the data we upload
      > via a automatic process I'm trying to eliminate the manual process of
      > actually submitting the data. Any suggestions?[/color]

      curl, either from within PHP or CLI or any other place that lets you
      call it.

      Comment

      • Wescotte

        #4
        Re: Automation

        Thanks alot

        It appears CURL does pretty much everything I need.

        Eric

        Comment

        • f700b

          #5
          Re: Automation



          Wescotte ha escrito:[color=blue]
          > Thanks alot
          >
          > It appears CURL does pretty much everything I need.
          >
          > Eric[/color]

          I'm trying to eliminate the manual process of
          submit the data with php curl. I have the below code
          I know the username and password, how can i login
          via an automatic process?
          Thanks

          <?
          $url='http://path/to/html/page';
          $ch = curl_init();
          curl_setopt ($ch, CURLOPT_URL, $url);
          curl_setopt ($ch, CURLOPT_HEADER, 0);
          curl_exec ($ch);
          curl_close ($ch);
          ?>

          Comment

          • Wescotte

            #6
            Re: Automation

            I've only read it's features I have yet to actually use CURL so I'm
            unable to help you right now.

            Eric

            Comment

            Working...