Monday, May 31, 2010

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

Sorry Tiago.
Sorry Bharadwaj.

I think both of you misunderstood my requirement. Please note the word
"generated source" not "source of the webpage".
Actually, by using the method suggested by Bharadwaj, we will get the
source of a webpage, but in that we don't get the source of some
special items generated by javascript or any other scripts.

Hope you got the idea.

Thanks.


On May 31, 11:43 am, Bharadwaj Parthasarathy <barbi.br...@gmail.com>
wrote:
> Try this
>
> <?php
>
>         $url = "http://www.google.com/intl/en/about.html";
>         $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 sitehttp://cakeqs.organd 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 athttp://groups.google.com/group/cake-php?hl=en

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: