473,386 Members | 1,673 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,386 software developers and data experts.

Perl Headers

I'm trying to retrieve the header for this website listed below. Is there a function to pull the header from this site? I was able to pull the header from my dos prompt using the HEAD funtion. The results were:

D:\>HEAD -e http://is053018.verizon.com:8810/rcmcvp/Main.vxml
200 OK
Connection: Close
Date: Mon, 07 Aug 2006 19:08:57 GMT
Server: WebLogic WebLogic Server 6.1 SP4 11/08/2002 21:50:43 #221641
Content-Length: 5745
Last-Modified: Mon, 31 Jul 2006 13:53:30 GMT
Client-Date: Mon, 07 Aug 2006 20:08:40 GMT
Client-Peer: 151.203.131.104:8810
Client-Response-Num: 1

My code thus far just prints the code...but I'm trying to print both the header and the code.
************************************************** *******************

<?xml version="1.0" ?>
<vxml version="2.0" application="WholesaleVoicePortalRCMC.vxml">

<!-- Main.vxml is the entry point of the application -->

<form id="Main">

<property name="bargein" value="false"/>
<catch event="error.badfetch">
<script>
<![CDATA[
vxmllog ("[Main] Error : error.badfetch");
]]>
</script>
<goto next="Welcome.vxml#Welcome" />
</catch>

<catch event="telephone.disconnect.hangup">
<script>
<![CDATA[
var metricsURL = "rcmcvp?RequestID=metrics&identifier=CallDisconnec tEvent&prompt=" + application.prompt_welcome + "&disconnectType="+ application.disconnect_type_hangup + "&CallUUID="+ session.call.uuid;
vxmllog("[Main.vxml] metricsURL= " +metricsURL);
]]></script>
<data expr="metricsURL" method="GET" name="oData" fetchtimeout="5s" />
</catch>

<block>
<!-- clear global variables -->
<clear namelist="application.callertype application.us_state application.ccna application.ispname" />
<clear namelist="application.region application.order_number application.product application.reason_code"/>
<assign name="application.current_prompt" expr="application.prompt_welcome"/>
<script>
<![CDATA[
var now = new Date();
now.setTime(now.getTime() + (3*60*60*1000));
var easternTime = now;
var year = easternTime.getFullYear();
var month = leadingZero(easternTime.getMonth()+1);
var day = leadingZero(easternTime.getDate());
var hour = leadingZero(easternTime.getHours());
var min = leadingZero(easternTime.getMinutes());
var sec = leadingZero(easternTime.getSeconds());

function leadingZero(nr)
{
if (nr < 10) nr = "0" + nr;
return nr;
}

var received_timestamp = year+month+day+hour+min+sec;
vxmllog ("Date is : " + received_timestamp);
vxmllog ("[Main] New Call to Voice Portal Application. ");

]]>
</script>
<script>
<![CDATA[
vxmllog("[Main.vxml] CallReceivedEvent");
var metricsURL = "rcmcvp?RequestID=metrics&identifier=CallReceivedE vent&CallUUID="+ session.call.uuid +"&ANI=" + session.telephone.ani;
vxmllog ("[Main.vxml] metrics CallReceivedEvent="+metricsURL);
]]>
</script>
<data expr="metricsURL" method="GET" name="oData" fetchtimeout="5s" />
<!-- Get session ID then transfer control to Welcome.vxml -->
<submit next="GetSessionID.jsp" method="POST" fetchtimeout="30s" />
</block>
</form>

<form id="MainCallFlow">
<var name="menu_option"/>
<var name="menu_input"/>

<catch event="telephone.disconnect.hangup">
<script>
<![CDATA[
var metricsURL = "rcmcvp?RequestID=metrics&identifier=CallDisconnec tEvent&prompt=" + application.current_prompt + "&disconnectType="+ application.disconnect_type_hangup + "&CallUUID="+ session.call.uuid;
vxmllog("[GetCompanyCodeSubdialog.vxml] metricsURL= " +metricsURL);
]]></script>
<data expr="metricsURL" method="GET" name="oData" fetchtimeout="5s" />
</catch>

<!-- Get Company Code from caller -->
<subdialog name="getCompanyCode" src="GetCompanyCodeSubdialog.vxml#GetCompanyCode" cond="application.companycode == undefined">
<filled>
<assign name="application.current_prompt" expr="application.prompt_company_code"/>
<assign name="application.companycode" expr="getCompanyCode.input" />
<script>
<![CDATA[
vxmllog ("[Main.vxml#getCompanyCode] company code:" + application.companycode);
]]>
</script>
</filled>
</subdialog>

<!-- Get menu option from caller. -->
<subdialog name="mainmenu" src="MainMenuSubdialog.vxml#Menu">
<filled>
<assign name="application.current_prompt" expr="application.prompt_mainmenu"/>
<assign name="application.menu_option" expr=" mainmenu.input" />
<if cond = "mainmenu.input == 'tt status'">
<assign name="menu_input" expr="'1'" />
<script>
<![CDATA[
vxmllog ("[Main.vxml#MainCallFlow] menu option:" + application.menu_option);
var metricsURL = "rcmcvp?RequestID=metrics&identifier=MenuOptionSel ectedEvent&menuOption=" + menu_input + "&CallUUID="+ session.call.uuid;
vxmllog("[Main.vxml#MainCallFlow] metricsURL= " +metricsURL);
]]>
</script>
<data expr="metricsURL" method="GET" name="oData" fetchtimeout="5s" />
<goto next="OptionStatusTTSubdialog.vxml#TTStatus"/>
<elseif cond="mainmenu.input == 'lsi helpdesk'"/>
<assign name="menu_input" expr="'2'" />
<script>
<![CDATA[
vxmllog ("[Main.vxml#MainCallFlow] menu option:" + application.menu_option);
var metricsURL = "rcmcvp?RequestID=metrics&identifier=MenuOptionSel ectedEvent&menuOption=" + menu_input + "&CallUUID="+ session.call.uuid;
vxmllog("[Main.vxml#MainCallFlow] metricsURL= " +metricsURL);
]]>
</script>
<data expr="metricsURL" method="GET" name="oData" fetchtimeout="5s" />
<goto next="OptionLSISubdialog.vxml#LSI"/>
<else/>
<assign name="menu_input" expr="'3'" />
<script>
<![CDATA[
vxmllog ("[Main.vxml#MainCallFlow] menu option:" + application.menu_option);
var metricsURL = "rcmcvp?RequestID=metrics&identifier=MenuOptionSel ectedEvent&menuOption=" + menu_input + "&CallUUID="+ session.call.uuid;
vxmllog("[Main.vxml#MainCallFlow] metricsURL= " +metricsURL);
]]>
</script>
<data expr="metricsURL" method="GET" name="oData" fetchtimeout="5s" />
<goto next="OptionOthers.vxml#AllOthers"/>
</if>
</filled>
</subdialog>
<block>
<disconnect/>
</block>
</form>
</vxml>
Aug 9 '06 #1
1 4784
My code thus far...

#!/usr/bin/perl

print "Content-Type: text/html\n\n";

open HTML, "Main.vxml" or die $!;

while( <HTML> ) {

print;

}

close HTML;
Aug 9 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

58
by: @ | last post by:
A benchmark in 2002 showed PHP is much slower in shell or when Apache has Mod_Perl. With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice. Java is for a big team in short...
1
by: bezeee | last post by:
At my work we are in the process of building a tool to test an XML based API. Basically, XML in and XML out over http. Currently, there are two engines that do all of the schema validations, xml...
2
by: ben moretti | last post by:
hi i'm learning python, and one area i'd use it for is data management in scientific computing. in the case i've tried i want to reformat a data file from a normalised list to a matrix with some...
1
by: JD Vernon | last post by:
I'm working on a Perl gatekeeper for report requests on an Oracle web app Essentially, the code is: if (invalid request) { burp; } else { print report; }
4
by: Firewalker | last post by:
Hey guys, I am newbie to perl. I am trying to deal with dates ( such trying to find what the date would be after month). Is therea function or date class( I am a java programmer, I couldnt find...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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
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...

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.