开发者

PHPQuery -> WebBrowser Example 2 won't work [still looking for answer]

I can't seem to get this code working

phpQuery::$ajaxAllowedHosts = 'google.com'; 
phpQuery::browserGet('http://www.google.com/', 'success1');
function success1($browser) {
  $browser
    ->W开发者_JS百科ebBrowser('success2')
    ->find('input[name=q]')
      ->val('search phrase')
      ->parents('form')
        ->submit();
}
function success2($browser) {
  print $browser;
}

It's example 2 from this page:http://code.google.com/p/phpquery/wiki/WebBrowser

All it does is just output blank.

Can someone see anything I am doing wrong?

Thanks


You've allowed the google.com.au host then made a request to a different host google.com.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜