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:


  • BK: 大於和小於在今日更廣泛地使用於標籤上,故在此補充該英文用法: : angle bracket []: square bracket
  • luh1688: 非常實用且謝謝!~
  • asd: 好的,不過很久沒修改了,不知道能不能動 寄到您的yahoo信箱
  • LIANG: nice post, thank you
  • Justmaker: 您好,請問可以跟你要source嗎?我最近有在看股票,想要enhance您的小工具,不知是否可以開放?

Category