Greetings StacksOverFlow Devs,
I'm trying to figure out earlier why the hidden input values at the website not appearing when I try to echo it and I used preg_match_all and made the hidden value POST.
I want to echo both at the same time but that is my problem couz it's not appearing.
Here is my code:
<?php
function get_data($url)
{
$ch = curl_init();
$timeout = 10;
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$returned_content = get_data('https://secure.tesco.com/account/en-GB/login');
$container = $returned_content;
preg_match_all('(<form\s.*</form>)', $container, $forms);
print_r($forms);
$_POST['_csrf'] = $csrf;
$_POST['state'] = $state;
echo "<font color=red><b>CSRF</b></font> : ".$csrf."<br/>";
echo "<font color=red><b>STATE</b></font> : ".$state."<br/>";
?>
Can someone help me about this?