Monday, May 31, 2010

Re: Generated Source of webpage using cURL or any other methods in PHP?

Try this

<?php

$tw = curl_init();
curl_setopt($tw, CURLOPT_URL, $url);
curl_setopt($tw, CURLOPT_RETURNTRANSFER, TRUE);
$search_res = curl_exec($tw);
curl_close($tw);


echo substr($search_res, 0, 600); // here is your source code, do whatever you want with this


?>





On 31-May-10, at 2:58 AM, si-mon wrote:

Hi all,

How do we get the generated source of a page using cURL? Or any other
method(s) for this?
Please...

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: