Curl script in PHP "unexpected T_VARIABLE" -


i trying reproduce curl script in php page:

`$ curl -f userfile=@image_file_name \ -f outputencoding="utf-8" \ -f outputformat="txt" \ http:// server_address /cgi-bin/submit.cgi >result.tx` 

i trying build this:

<?php $file="test.jpg" $cmd="curl -f userfile=$file \    -f outputencoding=\"utf-8\" \   -f outputformat=\"txt\" \    http://maggie.ocrgrid.org/cgi-bin/weocr/ocr_scene.cgi >result.txt"  exec($cmd, $result) echo $result; ?> 

but keep getting:

parse error: syntax error, unexpected t_variable in /.../default.php on line 4

i have tried scaping , not scaping the quotation marks , looks that's not issue, suggestion?


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -