POST request with data specified in text file via CURL?
I have a simple CMS based on css,HTML and PHP witout DB. I made a cURL
script to update the content, including templates (mix of text and HTML)
via POST.
curl_setopt ($upload, CURLOPT_POSTFIELDS, $postfields);
and &postfields:
$postfields["person"] = "Kris";
$postfields["action"] = "Update";
$postfields["page"] = "Name of the page";
$postfields["newcontent"] = $post;
+
$post=file_get_contents("update.txt");
What I need is to send via POST data specified in text file (update.txt)
including a mix of html/css/php.I don't want to upload a single file just
POST its content Any idea? :) Thanks!
No comments:
Post a Comment