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
.
精彩评论