Jump to content

I NEED HELP BADLY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


cooper10

Recommended Posts

captcha.php is a php file i want to run at the background i want to click on a HTML LINK(detailedinfo) which will link me to bank customer transaction information page at the click of the HTML LINK, it will lead to the customer transaction information page and at the same time it will also run captcha.php file at the background

 

Link to comment
https://forums.phpfreaks.com/topic/147314-i-need-help-badly/
Share on other sites

First off take off the caps, annoying as all hell. Secondly, stop holding the ! key down, also very very annoying.

 

Secondly, what is the question. Your post is redundant and really gibberish. Do you have any code and a specific example?

 

Lay off the meth and take an extra 5 minutes to fully explain yourself and maybe someone will help you.

Link to comment
https://forums.phpfreaks.com/topic/147314-i-need-help-badly/#findComment-773268
Share on other sites

this is the captcha.php

<?php

    require 'captcha-settings.php';

 

function captchaImgUrl()

{

global $captchaimg;

captchaCode();

return $captchaimg;

}

 

function captchaCode()

{

global $captchaimg;

// Don't generate the code twice

if (!isset($_SESSION['captchacode']))

{

// Skip f, x and s, they are too hard to tell

// apart when spoken. Skip l, it is confused

// routinely with 1.

$chars = "abcdeghijkmnopqrtuvwyz";

$code = "";

$length = mt_rand(7, 7);

for ($i = 0; ($i < $length); $i++)

{

$char = substr($chars,

rand(0, strlen($chars) - 1), 1);

$code .= $char;

}

$_SESSION['captchacode'] = $code;

}

$salt = mt_rand(1000000, 2000000);

if (isset($_SERVER['SCRIPT_URL'])) {

$scriptUrl = $_SERVER['SCRIPT_URL'];

} elseif (isset($_SERVER['SCRIPT_URI'])) {

$scriptUrl = $_SERVER['SCRIPT_URI'];

} elseif (isset($_SERVER['REQUEST_URI'])) {

$scriptUrl = $_SERVER['REQUEST_URI'];

} else {

die("captcha.php: SCRIPT_URL, SCRIPT_URI and REQUEST_URI are unavailable, I can't find myself");

}

$scriptUrl = preg_replace('/\\?.*$/', '', $scriptUrl);

$captchaimg = $scriptUrl . "?captchaimg=1&captchasalt=$salt";

}

function captchaDone()

{

if ($_SESSION['captchacode']) {

unset($_SESSION['captchacode']);

}

captchaCode();

}

 

function captchaSendImg()

{

global $captchaFont;

# 20071206: If we just called captchaDone, this won't

# be set up. But there's nothing wrong with wanting

# a new CAPTCHA in the very same HTTP response.

if (!isset($_SESSION['captchacode'])) {

captchaCode();

}

$code = $_SESSION['captchacode'];

$im = imagecreatetruecolor(200, 50);

imageantialias($im, 1);

$back = imagecolorallocate($im, 255, 255, 255);

$fore = imagecolorallocate($im, 0, 0, 0);

imagefilledrectangle($im, 0, 0, 200, 50, $back);

$x = mt_rand(10, 20);

$y = mt_rand(20, 35);

$length = strlen($code);

for ($i = 0; ($i < $length); $i++) {

$char = substr($code, $i, 1);

$size = mt_rand(10, 10) + 16.0;

$angle = mt_rand(0, -45);

$xoffs = mt_rand(-3, 3);

$yoffs = mt_rand(-5, 5);

imagettftext($im, $size, $angle,

$x + $xoffs, $y + $yoffs,

$fore, $captchaFont, $char);

$x += 23;

$code .= $char;

}

 

// Now add lots of noise to

// confuse OCR software

$flakes = (200 * 50) / 16;

$flakes = mt_rand($flakes * .8, $flakes * 1.2);

for ($i = 0; ($i < $flakes); $i++) {

$x1 = mt_rand(0, 200);

$y1 = mt_rand(0, 50);

$x2 = $x1 + mt_rand(-2, 2);

$y2 = $y1 + mt_rand(-2, 2);

imageline($im, $x1, $y1, $x2, $y2, $fore);

}

// jpeg is lossy, which is good here, because

// it makes automated analysis of the captcha

// a little more difficult.

header("Content-type: image/jpeg");

imagejpeg($im, 'captcha.jpg');

exit(0);

}

 

function captchaBasePath()

{

$src = __FILE__;

$path = preg_replace('/\/[^\/]+$/', '', $src);

return $path;

}

 

if (isset($_GET['captchaimg']))

captchaSendImg();

else

captchaCode();

?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/147314-i-need-help-badly/#findComment-773548
Share on other sites

detailedinfoexec.php

 

<?php require_once('Connections/conndb.php'); ?>

<?php require_once('functionclean.php'); ?>

<?php require_once('auth.php'); ?>

<?php require_once('captcha.php'); ?>

 

<?php

 

$captchaFormAction = $_SERVER['PHP_SELF'];

 

if(isset($_POST['captcha']))

{

    //Compare Session(Generated captcha in captcha.php) and POST captcha which the user enters in the form

$captcha = clean($_POST['captcha']);

 

if ($_POST['captcha'] == $_SESSION['captchacode'])

{

  $_SESSION['Captcha'] = $captcha;

  header("location: captcha_success.php");

  exit();

}

else

{

      header("location: detailedinfo.php");

  exit();

}

}

?>

Link to comment
https://forums.phpfreaks.com/topic/147314-i-need-help-badly/#findComment-773549
Share on other sites

captcha.php

 

//if (isset($_GET['captchaimg']))

captchaSendImg();

//else

//captchaCode();

 

when i uncomment

 

//if (isset($_GET['captchaimg']))

//else

//captchaCode();

 

in captcha.php, i am unable to open detailedinfo.php which is the form that requires detailedinfoexec.php stated above. only a image which cant be seen is displayed in the detailedinfo.php.

Link to comment
https://forums.phpfreaks.com/topic/147314-i-need-help-badly/#findComment-773552
Share on other sites

captcha.php is a php file i want to run at the background i want to click on a HTML LINK(detailedinfo) which will link me to bank customer transaction information page at the click of the HTML LINK, it will lead to the customer transaction information page and at the same time it will also run captcha.php file at the background

Link to comment
https://forums.phpfreaks.com/topic/147314-i-need-help-badly/#findComment-773559
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.