My problem is that I don't know how to "capture" the results of a web page in php after data has been posted.
I have tried ob_start() and ob_end_flush and fload().And curl()
Here is my basic first attempt which actually does work (and I have read the posting code message, but I am so new I don't even know how to format this correctly. I am sorry). (Also I do have permission to adapt these web pages)
Code: Select all
<?php
$ch = curl_init("http://208.239.76.141");
// set file to read
$file = 'http://208.239.76.141/account/login.php';
// read file into string
$data = file_get_contents($file) or die('Could not read file!');
// print contents
// echo $data;
$patterns[0] = '/Login/';
$patterns[1] = '/action="/';
$patterns[2] = '/Phone/';
$replacements[0] = 'mmm clever';
$replacements[1] = 'action="http://208.239.76.141';
$replacements[2] = 'goodness';
$data = preg_replace($patterns, $replacements, $data);
echo $data
?>But how can I do the same "word swapping" for the results of this page after Login?
In other words can I log onto a website and still remain in a php program to manipulate the results before they reaches the users browser and if so how?
Thanks
Charlie
JCART | Please use
Code: Select all
tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color][/size]