Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]metoda post wysyłanie w CURL'u
kubek15
post
Post #1





Grupa: Zarejestrowani
Postów: 278
Pomógł: 3
Dołączył: 28.06.2008
Skąd: PL

Ostrzeżenie: (0%)
-----


Witam. Chce aby dane były wysłane metodą post w CURL'u znalazłem cos takiego ale nie działa mi to niewiem czemu.
  1. <?php
  2. $c = curl_init();
  3. curl_setopt($c, CURLOPT_URL,  "http://www.webcron.pl/index.html\");
  4. curl_setopt($c, CURL_POST, 1);
  5. curl_setopt($c, CURLOPT_POSTFIELDS,  "username=kubek&password=kubek&#092;");
  6. curl_exec($c);
  7. curl_close($c);
  8.  
  9.  
  10. $x = curl_init();
  11. curl_setopt($x, CURLOPT_URL, "http://www.webcron.pl/konto.html\");
  12. curl_setopt($x, CURL_POST, 1);
  13. curl_setopt($x, CURLOPT_POSTFIELDS,  "add_points=true&#092;");
  14. curl_exec($x);
  15. curl_close($x);
  16. ?>

To jest piwerszy formularz.
  1. <form action=index.html method=POST name=login>
  2. <input type=hidden name=login_send value=true>
  3. <table width=100%>
  4. <td align=right><table><tr>
  5. <td>Login:</td>
  6. <td><input type=text class=pole_login name=username size=10></td>
  7. <td>Hasło:</td>
  8. <td><input type=password class=pole_login name=password size=10></td>
  9. <td><input type=submit class=pole_login value="Zaloguj"></td>
  10. </tr></table>
  11. </td></tr></table></form>


Ten post edytował kubek15 12.04.2009, 10:55:25


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 08:13