Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]curl
dark_root
post
Post #1





Grupa: Zarejestrowani
Postów: 341
Pomógł: 1
Dołączył: 19.11.2007

Ostrzeżenie: (10%)
X----


mam takie pliki
index.php
  1. <?php
  2. $hand = curl_init();
  3. curl_setopt($hand, CURLOPT_URL, 'http:example.pl/bb.php');
  4. curl_setopt($hand, CURLOPT_POST, 1);
  5. $postFields['l']=$_SERVER[HTTP_USER_AGENT];
  6. curl_exec($hand);
  7.  
  8. curl_close($hand);
  9. ?>

oraz
bb.php
  1. <?php
  2. $ruben=$_POST['l'];
  3. $nazwapliku = 'ruben.txt';
  4. $plik = @fopen($nazwapliku, "a") ;
  5. flock($plik, 2) ;
  6. fwrite($plik,"$ruben") ;
  7. flock($plik, 3) ;
  8. fclose($plik) ;
  9. ?>

Jak włączę plik index.php do do bb.php nic się nie zapisuje pomimo tego, iż nie wyskakuje żaden błąd. Czemu to nie działa?

Ten post edytował dark_root 6.10.2008, 15:13:38
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
dark_root
post
Post #2





Grupa: Zarejestrowani
Postów: 341
Pomógł: 1
Dołączył: 19.11.2007

Ostrzeżenie: (10%)
X----


Wielkie dzięki (IMG:http://forum.php.pl/style_emoticons/default/rolleyes.gif)

A wie ktoś może czemu ten kod nie działa
index.php
  1. <?php
  2. $hand = curl_init();
  3. curl_setopt($hand, CURLOPT_URL, 'http://example.pl/123');
  4. curl_setopt($hand, CURLOPT_POST, 1);
  5. $b['msg_send']=123;
  6. $postFields['subject']=czesc;
  7. $a['message']=[color="#000000"]$_SERVER[HTTP_USER_AGENT][/color];
  8. curl_setopt($hand, CURLOPT_POSTFIELDS, $postFields&a&$b);
  9. curl_exec($hand);
  10. curl_close($hand);
  11. ?>

Oto kod formularza, pod który próbuję się podpiąć
  1. <?php
  2. <form name="inputform" method="post" action="http://example.pl/0" onsubmit="return ValidateForm(this)">
  3. <input name="msg_send" value="123" type="hidden">
  4. Temat:
  5. <input name="subject" value="" maxlength="32" class="textbox" style="width: 400px;" type="text"></td>
  6. Wiadomoś&#263;:
  7. <textarea name="message" cols="80" rows="15" class="textbox"></textarea>
  8.  
  9. <input name="send_preview" value="Podgląd" class="button" type="submit">
  10. <input name="send_message" value="Wyślij" class="button" type="submit">
  11. </form>
  12. ?>

Jednak nic się nie wysyła. Co jest źle?

Ten post edytował dark_root 6.10.2008, 20:30:57
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 3.10.2025 - 12:12