You guys have become like failmy to my partner and I! We watched the show last night and I cried like a baby! My partner is like Brent and doesn’t cry very often. Well, last night was a different story..he cried also. We are going to much more conscious about our meats and buy more organic and local goods! Thanks for inspiring us all! P.S. We watched the Dr. Brent and Martha episode online about making goat milk soap. We made our first bars the night before your show. They are turning out. You inspire people in so many different ways..keep it up!
php – POST something to URL without a form? – Stack Overflow
POST something to URL without a form?
Can I POST something to a URL and grab the result without a form and a submit button in PHP? If so, how does that work?
After a lot of trial and error, I got it to working.
I used the method described in the accepted answer, but what I had to do additionally before POSTing my code was:
$html_body = str_replace(“\n”, “”, $html_body);
$html_body = str_replace(“\t”, “”, $html_body);
$html_body = urlencode($html_body);
I had to add those for my purpose and you may not need them, but just keep it in mind.
php forms post
share|improve this question
Jan 14 ’11 at 1:18
Jan 13 ’11 at 20:48
96% accept rate
I have an internal stylesheet and some HTML. The third-party said to post all of that to their URL and they will inline everything (CSS). So I will be posting all of the code and get an inlined version in return. – NightHawk Jan 13 ’11 at 21:00
this is everything what should know about curl
and this will POST without form as easy as:
$ch = curl_init(“example.com/curl.php?option=test”);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
share|improve this answer
Mar 12 ’11 at 12:27
Jan 13 ’11 at 20:53
So ‘test’ is the data I’m sending, right? If that data happens to be HTML/CSS code, how can I make sure the characters ($, =, etc) don’t mess up by being in a query-string? – NightHawk Jan 13 ’11 at 21:04
Yes – you sending variable option what equal "test" – bensiu Jan 13 ’11 at 21:19
This article lays out how to do a POST in PHP programmatically without a form. davidwalsh.name/execute-http-post-php-curl
share|improve this answer
Jan 13 ’11 at 20:49
required, but never shown
By posting your answer, you agree to the
terms of service.
Not the answer you’re looking for?
Browse other questions tagged php forms post
or ask your own question.
This is a collaboratively edited question and answer site for professional and enthusiast programmers. It’s 100% free, no registration required.
about » faq »
php × 311392
forms × 24324
post × 8859
1 year ago
1 year ago
Meet the new additions to the Stack Exchange clan
Posting parameters to a url using the POST method without using a form
POST to a form that POSTS to another form
PHP form values after POST
cURL how post this form correctly?
PHP form will not post
form POST + direct. Not posting
Referrer URL from facebook form POST
Encrypting/Decrypting a POST form
White Screen on form post
Why is the post not coming through on a PHP form Post
form POST erases the view
Post value is in form empty
How can I include a form field in my POST if it is not in the current form?
String variable obtained via php _$post from html form seems to be getting erased
How to show ‘success’ message on form submit without changing URL?
How to use “ if(!empty($_POST#39; … ‘]))$… = ‘-‘; ”?
Form POST issue
HTML form POST not getting transfered into php $_POST
html dropdown form post to php
GET parameter in a POST <form>
Post request in PHP to form
how to send messageid through form post without using name and value php
POST Data Without Form
Submit POST form from url
advertising info |
■ careers 2.0
■ area 51
■ game development
■ theoretical cs
■ home improvement
■ electrical engineering
■ scifi $ fantasy
■ user experience
site design / logo © 2012 stack exchange inc;
user contributions licensed under cc-wiki with attribution required
Very good and interesting site with very good look and perfect information I like it
Mail (will not be published)
Bonus Watch ’16: Local Hooker Should Be Getting Paid Extra For This
You want to b*tch about your bonus? That’s another $500.
Get the latest financial news, headlines, commentary, and analysis when you subscribe to Dealbreaker.