开发者

Get a part of another page

开发者 https://www.devze.com 2023-02-11 02:59 出处:网络
I am trying to fetch a part of the page from another domain. I could directly embed as a frame. But i need to retrieve a part of it. How can i? I use:

I am trying to fetch a part of the page from another domain. I could directly embed as a

frame. But i need to retrieve a part of it. How can i? I use:

$.ajax({    

type: "POST",

            url: "marketToday.php",

            data: "symbol=" + symbol,

            success: function(html)

            {
                        alert(html);
            }
         });

in marketToday.php:

I retrieve a pag开发者_开发百科e using curl


PHP has built-in libraries (usually included by default) for DOM manipulation. Essentially you would need to use curl or file_get_contents() and then parse the source code with DOM or XPATH.

0

精彩评论

暂无评论...
验证码 换一张
取 消