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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -