| imho.ws |
![]() |
|
|
|
# 2 |
|
Registered User
Регистрация: 27.03.2002
Адрес: дома
Сообщения: 1 660
![]() ![]() |
можно
![]() php: Код:
$myFile=@fopen("http://www.domain.com/script.php?var=val","r");
@fclose($myFile);
Код:
use IO::Socket;
$server = "www.domain.com";
$remote = IO::Socket::INET->new(
Proto=>"tcp",
PeerAddr=>$server,
PeerPort=>"80",
Reuse=>1,
Type => SOCK_STREAM)
or print "Can't connect to \"$server\" ($!)\n";
$remote -> send ("GET http://www.domain.com/script.php?var=val HTTP/1.0\n\n", 0) || return "Can't send query: $!";
__________________
Всё будет хорошо! |
|
|
|
|
# 6 |
|
Guest
Сообщения: n/a
|
post на perl:
use strict; use LWP::UserAgent; my $x1 = ''blabla''; my $x2 = 666; my $x3 = "kuku"; my $data = 'par1=' . $x1 . '&par2=' . $x2 . '&par3=' . $x3; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(POST => 'http://www.site.kharkov.ua/script.asp'); $req->content_type('application/x-www-form-urlencoded'); $req->content($data); my $res = $ua->request($req); print $res->as_string; ============= get на perl use strict; use LWP::Simple; my $u = 'http://www.site.kharkov.ua/script.cgi?par1=666&par2=blabla' ; my $doc = get "$u"; print $doc; |