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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -