I wrote a php script that use simple_html_dom to parse a website infos. Its a big script and when I try to run it on my browser the script works but Time out before to end.. When I try using SSH I get this error:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in .... on line 30
line 30:
$titlevar = explode('for €', $element->find('a[class="title-link"]', 0)->plaintext);
Whats wrong with my code ? PS: I thought it was a problem with my php version so I tried to rename my file to .php5 but still not working... I changed my .htaccess to enable php5 but still when I use php -v it shows me PHP 4.4.9.
EDIT:
I had to run my script with this:
php5.4 script.php