473,395 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Good question...

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.

Nov 19 '05 #1
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.


Nov 19 '05 #2
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.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
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...
29
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...
72
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...
25
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...
12
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...
26
by: Marius Horak | last post by:
As in subject. Thanks MH
113
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...
59
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...
150
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...
76
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.