I supposed to use LWP module only, as this script needs to run in different server and LWP is distributed with Perl installation and am not allowed to install/use new modules. Is it possible to do using LWP module?
Regards,
N.Srinivasan...
User Profile
Collapse
-
Using Credentials on LWP
Hi,
I want to download a pdf file from password protected website. Using browser(IE/FireFox) when i click the pdf link it shows a window, which asks 'username' and 'password'. I want to automate the process using LWP in perl. I have used both 'authorization_ basic' and 'credentials', but doesn't work.
My code:
Code:use strict; use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Cookies;
-
Since i didn't get reply for the past four days, i have a doubt that my question is not understandable? or shall i post to some other forums(i am asking this b'cos i saw from some other posts as 'dont post the same question to many forums')
-FreedolenLeave a comment:
-
How to login website using LWP and HTTP modules?
Hi All,
I had a perl script which is used to login in a web page, but it gives the error as
"301 Moved Permanently". What does this means and how can it be rectified?
Can anyone help on this?
Code Snippet:
[CODE=perl]
use HTTP::Cookies;
use HTTP::Request;
use HTTP::Request:: Common qw(POST);
use URI::URL;
use HTML::LinkExtor ;
use LWP 5.64;
... -
Hi,
I have solved the issue by adding 'target' and 'name' properties in HTML coding
HTML Modifications:
<form method="post" action="http://localhost:8080/cgi-bin/Searchengines.p l" target="resultf rame">
HTML Code Modifications in Perl File:
print "<frame src='http://www.hakia.com/?q=".$searchter m."' name='resultfra me'/>";
print "<frame...Leave a comment:
-
Need help in Frames
Hi
- I found a website "http://www.gahooyoogle .com" which is a search engine and fetches result from both yahoo and Google.
- tried to develop a similar one but with more simpler and i choose(Hakia, AltaVista and Google) as my search engines. I developed a html(MySearchPa ge.html) with textbox and submit button, when search term entered and clicking on submit button it calls a perl file.
- In perl file there is a Html code,
-
CGI and Frames
Hi
1. I found a website "http://www.gahooyoogle .com" which is a search engine and fetches result from both yahoo and google.
2. I tried to develop a similar one but with more simpler and i choose(Hakia, AltaVista and Google) as my search engines. I developed a html(MySearchPa ge.html) with textbox and submit button, when search term entered and clicking on submit button it calls a perl file.
3.... -
LWP::Simple -- Getting Filename
Hi All,
With the below code i am able to get the contents, but i need to get the filename whether it is 'index.html' or 'index.htm' or 'google.html'. How can i get it?
use strict;
use LWP::Simple;
my $htmlcontent = get("http://www.google.co.i n");
print $htmlcontent;
Thanks in Advance,
Freedolen -
What is the difference between 'load data' and 'insert' command?
Hi,
I have checked with some sample data and found inserting of data using 'insert command' takes more time than using 'load data' command to load data from another file. What is the process difference between these two commands. I have another question, when i insert data using load data command from external file is there anyway to get how much rows inserted at the time of loading the data.
Regards,
Freedol... -
Need guidance to choose datatype
Hi,
What datatype can i choose for a column to store the unknown length of value. The value may be characters, numbers, punctuations(sp ecial characters). For ex: i had a column for 'description', the value may be one word, one line or multiple words. I have created a column with datatype of 'Description Varchar(300)' but when the length of value exceeds 300 it reports error as 'Data too long for column 'description''. Guide me to make... -
What does '::' denotes in TitleBar?
I found '::' in the start of TitleBar on some web pages.
What does '::' this mean? -
You can use any pre-defined modules such as Text::Diff or you can modify/use the following coding
[CODE=perl]
use strict;
use warnings;
my $firstfile = 'test1.txt';
my $secondfile = 'test2.txt';
open(F1, $firstfile) or die "Unable to open $firstfile $!\n";
open(F2, $secondfile) or die "Unable to open $secondfile $!\n";
my @firstfile = <F1>;
...Leave a comment:
-
And the above code also doesn't get compiled to me, without adding '-' for each of the options and here is the corrected code.
[CODE=perl]use Tk;
$top = MainWindow->new();
$top->title("Simple" );
$foo = $top->Label(
-text =>'hello',
-anchor =>'n',
-relief =>'groove',
-width =>10,
-height =>3,
);
$foo->pack();...Leave a comment:
-
Hi Miller,
Thanks for your work, but MS-Access doesn't supports 'DESC' statement. It throws error message as "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.".
I have Googled and got the following coding to get the column names from table. But beyond this i need to know is there any one liner available in DBI as 'FieldNames()' in ODBC to get the column names.
...Leave a comment:
-
Getting FieldNames from DBI Module
Hi,
I am using DBI module to interact with MS-Access Database. I need to know in DBI module, is there any similar method as 'FieldNames()' from Win32::ODBC to get the Field names from MS-Access table.
Thanks in Advance,
Freedolen -
Install CPAN Modules in Windows
Hi,
I am trying to install CPAN modules in Windows 2000, but i am getting error as "Can't locate object method "make" via package "PACK001" at C:/Perl/lib/ExtUtils/MM_Win32.pm line 131."
I have also copied nmake.exe to my C:\WINNT
My requirement is to install XML::LibXML and this module not found in "ppm".
OS: Windows 2000
Perl: 5.8.3
Regards,... -
Getting Tiff Image Properties
Hi,
Iam new to this forum.
I need to find the given TIFF image is in CMYK or RGB.
Though i have checked with Image::Magick, and used:
Code:my $img = new Image::Magick; $img->Read("Sample.tif"); my ($type) = $img->Get("type"); print $type;
No activity results to display
Show More
Leave a comment: