i want to write a script which post a form automatically. it is not a spammer! there is a picture field in form. i want to write the script with php and using curl() function. how can i implement file uploading? and is the php suitable for this purpose? i mean form posting?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
To upload a file that's on your server, yes, curl can do the trick.
You'll want to use the
CURLOPT_POSTFIELDS
option, passing it to thecurl_setopt
function (quoting) :Not tested, but I suppose that something like this should work :