[ic] How to include HTTP GET response in an IC page
Peter
peter at pajamian.dhs.org
Mon Jul 24 22:21:05 EDT 2006
On 07/24/2006 06:16 PM, DB wrote:
>>[calcn]
>> my $page = $Tag->get_url('http://www.example.com/mypage.xml');
>> $page =~ m!<string>(.+?)</string>!;
>> $1;
>>[/calcn]
>>
>>Peter
>
> The url I use in the [get-url] tag contains username and password
> information which anyone could view simply by looking at the source of
> my IC page. Any thoughts about how to get around that problem?
Only people with access to the Interchange pages will be able to see it,
you won't be able to see it with view page source in your browser.
That said, you can easily grab the username and password from nearly any
source and include it in the code above, for example if you have the
username and passwrod in scratch variables:
[calcn]
my $page =
$Tag->get_url(sprintf('http://www.example.com/mypage.xml?username=%s&password=%s',@{$Scratch}{username,password}));
$page =~ m!<string>(.+?)</string>!;
$1;
[/calcn]
You can do something similar with values or with catalog or global
variables, you can even store them in a db and fetch them for use in
your code.
Peter
More information about the interchange-users
mailing list