This project is read-only.

PHP throws T_OBJECT_OPERATOR with this

Nov 6, 2010 at 1:43 AM

Hi.  Newbie here.  I tried to modify your example, but cannot seem to get this to work in my environment.  I keep getting this error on my php server:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/kev/public_html/search/espn_playerid_search3.php on line 12

// Include the Bing API PHP Libraryrequire 'library/BingAPI.php';
// Simply start the class with your AppID argumented$search = new BingAPI('00B524C52C51034C9E3B57F3DD869DD5D3CCD1CD');

    //$searchWeb = ""    

$search->query('Albert Pujols')          






           'Web.Count' => '1',                            

           'Web.Offset' => '0',                            

           'Adult' => 'Moderate' )

    // Contains the search    

$results = $search->getResults();    

echo("results are $results");      


The server is running PHP 4.4.9.  Any suggestions?  I'm stumped.


Dec 14, 2010 at 9:29 AM

You're using PHP 4.4.9 and this library will only work with PHP 5+.

So it is never going to work.