hi Guys,
Im trying to look at the html behind a website by using $mech->get($url) command using the use
Below is the code im using and an example output.
$mech->get($url);
$mech->success or die "Can't open page\n";
$content = $mech->content;
print $url;
print $content;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
<html xmlns="
<head>
<title>Betting</title>
<script type="text/javascript">
/*<![CDATA[*/
function createCookie(name,value,minutes) {
if (minutes) {
var date = new Date();
date.setTime(date.getTime()+(minutes*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
/*]]>*/
</script>
</head>
<body>
<script type="text/javascript">
/*<![CDATA[*/
var nRfrPos = location.search.indexOf("saarfr=");
var nCntPos = location.search.indexOf("saacnt=");
var sRfr = location.search.substring(nRfrPos+7, nCntPos-1);
var nCnt = parseInt(location.search.substring(nCntPos+7), 10);
if (isNaN(nCnt)) nCnt = 0;
var sHref;
if (nRfrPos != -1) {
createCookie('jbhckrFix', 'fInSoFt', 1440);
createCookie('ok2prcd', '1', 5); // 5min should be enough
sHref = unescape( sRfr );
if (sHref.indexOf("?") == -1) sHref += "?"; else sHref += "&";
sHref += "saacnt=" + (nCnt+1);
location.href = sHref;
} else {
sHref = location.href.toLowerCase();
if (sHref.indexOf("index.html") != -1)
sHref = location.href.replace("index.html","index.asp");
else {
var sTmp = location.host + "/betting/";
sHref = location.href.replace(sTmp, sTmp + "index.asp");
}
if (sHref.indexOf("?") == -1) sHref += "?"; else sHref += "&";
sHref += "saacnt=" + (nCnt+1);
location.href = sHref;
}
/*]]>*/
</script>
</body>
</html>
However the actual source on the website link is nothing like this!!
Does anyone know what i am doing wrong?
Kind regards
Nash
Im trying to look at the html behind a website by using $mech->get($url) command using the use
Below is the code im using and an example output.
$mech->get($url);
$mech->success or die "Can't open page\n";
$content = $mech->content;
print $url;
print $content;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
<html xmlns="
<head>
<title>Betting</title>
<script type="text/javascript">
/*<![CDATA[*/
function createCookie(name,value,minutes) {
if (minutes) {
var date = new Date();
date.setTime(date.getTime()+(minutes*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
/*]]>*/
</script>
</head>
<body>
<script type="text/javascript">
/*<![CDATA[*/
var nRfrPos = location.search.indexOf("saarfr=");
var nCntPos = location.search.indexOf("saacnt=");
var sRfr = location.search.substring(nRfrPos+7, nCntPos-1);
var nCnt = parseInt(location.search.substring(nCntPos+7), 10);
if (isNaN(nCnt)) nCnt = 0;
var sHref;
if (nRfrPos != -1) {
createCookie('jbhckrFix', 'fInSoFt', 1440);
createCookie('ok2prcd', '1', 5); // 5min should be enough
sHref = unescape( sRfr );
if (sHref.indexOf("?") == -1) sHref += "?"; else sHref += "&";
sHref += "saacnt=" + (nCnt+1);
location.href = sHref;
} else {
sHref = location.href.toLowerCase();
if (sHref.indexOf("index.html") != -1)
sHref = location.href.replace("index.html","index.asp");
else {
var sTmp = location.host + "/betting/";
sHref = location.href.replace(sTmp, sTmp + "index.asp");
}
if (sHref.indexOf("?") == -1) sHref += "?"; else sHref += "&";
sHref += "saacnt=" + (nCnt+1);
location.href = sHref;
}
/*]]>*/
</script>
</body>
</html>
However the actual source on the website link is nothing like this!!
Does anyone know what i am doing wrong?
Kind regards
Nash