can i do something like this in C# / VB.NET?
================================================== ======================
my $agent = LWP::UserAgent->new (requests_redirectable => ['POST','GET',
'HEAD']);
$agent->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
$agent->cookie_jar(HTTP::Cookies->new(autosave=>1));
my $url="http://www.comcom.com/login.asp";
my $result = $agent->get($url);
%formfields = (status => 1,
username => 'myuser',
password => 'mypassword');
$result = $agent->post($url, \%formfields);
my $html = $result->content();
if ( $html =~ /password/i) {
$errStr .= "Login to $url failed - Customer# $customerID: $";
return 0;
}
================================================== ======================
Tnx. 2 1080
Hi temp:
See: http://odetocode.com/Articles/162.aspx
--
Scott http://www.OdeToCode.com/blogs/scott/
On Wed, 18 May 2005 04:29:42 +0200, "temp"
<sp*****************@hotmail.com> wrote: can i do something like this in C# / VB.NET?
================================================= =======================
my $agent = LWP::UserAgent->new (requests_redirectable => ['POST','GET', 'HEAD']); $agent->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); $agent->cookie_jar(HTTP::Cookies->new(autosave=>1));
my $url="http://www.comcom.com/login.asp"; my $result = $agent->get($url);
%formfields = (status => 1, username => 'myuser', password => 'mypassword');
$result = $agent->post($url, \%formfields); my $html = $result->content(); if ( $html =~ /password/i) { $errStr .= "Login to $url failed - Customer# $customerID: $"; return 0; }
================================================= =======================
Tnx.
Enter the code into a free translator to either language.
Sccr18
"temp" wrote: can i do something like this in C# / VB.NET?
================================================== ======================
my $agent = LWP::UserAgent->new (requests_redirectable => ['POST','GET', 'HEAD']); $agent->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); $agent->cookie_jar(HTTP::Cookies->new(autosave=>1));
my $url="http://www.comcom.com/login.asp"; my $result = $agent->get($url);
%formfields = (status => 1, username => 'myuser', password => 'mypassword');
$result = $agent->post($url, \%formfields); my $html = $result->content(); if ( $html =~ /password/i) { $errStr .= "Login to $url failed - Customer# $customerID: $"; return 0; }
================================================== ======================
Tnx. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kirk Larsen |
last post by:
Here's what I want:
1. Simplicity. I basically want to be able to post news on the front
page, similar to a blog.
2. Good Image Gallery. I would like something that is simple to
navigate...
|
by: RAY |
last post by:
Hi ,
my boss has asked I sit in on an interview this afternoon and that I create
some interview questions on the person's experience.
What is C++ used for and why would a company benefit from...
|
by: E. Robert Tisdale |
last post by:
What makes a good C/C++ programmer?
Would you be surprised if I told you that
it has almost nothing to do with your knowledge of C or C++?
There isn't much difference in productivity, for...
|
by: Tim |
last post by:
Dear Developers,
Firstly, I'm not sure where this post should go so I apologise if this
is in the wrong group or area. I'm currently interviewing for a vb.net
developer who doesn't mind...
|
by: G. |
last post by:
Hi all,
During my degree, BEng (Hons) Electronics and Communications Engineering, we
did C programming every year, but I never kept it up, as I had no interest
and didn't see the point. But now...
|
by: Marius Horak |
last post by:
As in subject.
Thanks
MH
|
by: Bonj |
last post by:
I was in need of an encryption algorithm to the following requirements:
1) Must be capable of encrypting strings to a byte array, and decyrpting
back again to the same string
2) Must have the same...
|
by: Alan Silver |
last post by:
Hello,
This is NOT a troll, it's a genuine question. Please read right
through to see why.
I have been using Vusual Basic and Classic ASP for some years, and
have now started looking at...
|
by: tony |
last post by:
If you have any PHP scripts which will not work in the current releases
due to breaks in backwards compatibility then take a look at
http://www.tonymarston.net/php-mysql/bc-is-everything.html and...
|
by: lorlarz |
last post by:
Crockford's JavaScript, The Good Parts (a book review).
This shall perhaps be the world's shortest book review (for one of the
world's
shortests books).
I like Douglas Crockford (because I am a...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |