Thread: Auto POST

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    can you use a perl script?
    Code:
    #!/usr/bin/perl
    
    %form = ( key1 => "key1value",   # whatever you want to post goes here, fairly straightforward.
              key2 => "key2value",
    	  key3 => "key3value" );
    
    use URI::URL;
    use LWP::UserAgent;
    
    while(1)
    {
     $ua = new LWP::UserAgent;  
     my $curl = url("http:");
     $curl->query_form(%form);
     my $req = new HTTP::Request 'POST',
     "http://www.singtel-mobile.com/products_services/online_services/sms.html"; # your url here
     $req->content_type('application/x-www-form-urlencoded');
     $req->content($curl->equery);
     print $ua->request($req)->as_string; #this will print the results, comment it out if you feel it slows things down too much.
    }
    Last edited by Brian; 06-07-2003 at 08:00 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help (Trying to post message)
    By mrkm in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 10-06-2003, 04:05 PM
  2. Post your Best Text Adventure
    By Joe100 in forum Game Programming
    Replies: 3
    Last Post: 08-15-2003, 05:47 PM
  3. post update
    By iain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-12-2001, 10:47 AM