Link to home
Start Free TrialLog in
Avatar of rgb192
rgb192Flag for United States of America

asked on

does post require a form or curl to be post

<form action="targeturl.php" method="post">
  <input type="hidden" name="postvar1" value="1" />
  <input type="hidden" name="postvar2" value="cat" />
  <input type="hidden" name="postvar3" value="2017-01-01" />
  <input type="hidden" name="postvar4" value="jack@frost.com" />
  <input type="submit" />
</form>


does simplest example of a post need to be a webform.

is a form required to make sending data to url or api in post format


or curl (not pictured)

what makes
a post
a post
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Dave: You can also use fsockopen(), but the point remains the same.  

This comment, while very old, is still useful because it clearly shows the use of fputs() to write the client request and fgets() to read the server response.
http://php.net/manual/en/function.fsockopen.php#34887

This comment seems to illustrate the use of "verbs" and the rest of the request data fairly well.  It might require testing / refactoring for 21st century standards.
http://php.net/manual/en/function.fsockopen.php#101872

This is also worth understanding.
http://php.net/manual/en/function.parse-url.php