EvoTalk

Posts Tagged ‘http

19 二月, 2009

Http Post using Perl

Posted by: asd In: Code Snippet| Perl| 程式設計

http post file upload example
view plain

CODE:

use LWP::UserAgent;

use HTTP::Request::Common;

 

my $fname1 = "lastUtt.amr";

my $fname2 = "format.txt";

my $url = "http://10.129.6.228/post3.php";

my $ua  = LWP::UserAgent->new();

my $req = POST $url, Content_Type => 'form-data',

 Content      => [

  submit => 1,

  uploadedfile =>  [ $fname1 ],

  uploadedfile2 => [ $fname2 ]

 ];

my $response = $ua->request($req);

 

if ($response->is_success()) {

    print "OK: ", $response->content;

} else {

    print $response->as_string;

}

Tags: ,

26 二月, 2007

HTTP Client Class

Posted by: asd In: C++| Code Snippet| 程式設計

 
Discover WIN32. How to use a sync/async retrieve HTTP content in your ASP & VB projects
Simple HTTP Client using WININET
AmHttpUtilities
Retrieving the HTML source code
WWW (HTTP/HTTPS/FTP) Client using WININET
Classes for writing HTTP clients in C++
Get web page using WinInet class wrapper

Tags: