Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> fsockopen i cookies...
Supol
post 25.04.2005, 21:47:45
Post #1





Grupa: Zarejestrowani
Postów: 33
Pomógł: 0
Dołączył: 20.09.2003

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


Czy mozna oderbac (odczytac) cookies wysylany przez stronke otwierana przez fsockopen() questionmark.gif
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
hwao
post 25.04.2005, 22:15:07
Post #2


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




Mozna smile.gif
Taki ładniutki nagłówek smile.gif nic tylko go przetowrzyc i juz sie ma smile.gif
(zobacz sobie w naglowkach jak to wyglada:) )
Go to the top of the page
+Quote Post
Supol
post 26.04.2005, 20:55:18
Post #3





Grupa: Zarejestrowani
Postów: 33
Pomógł: 0
Dołączył: 20.09.2003

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


rzeczywiscie glupie troche pytanko :/ ale dzieki za odp. ale mam kolejne... odebralem juz odpwoeidz i cookies.. jak teraz wyslac jako POST? (jest uwierzytelnanie na cookies)
"Cookie: ...\r\n" tlyko co powinno byc w tych ... ? SESSIONID ? smile.gif a moze ktos ma jakis artykul na ten temat? (wysylanie przez fsocketopen? smile.gif )
Go to the top of the page
+Quote Post
hwao
post 26.04.2005, 21:32:31
Post #4


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




  1. <?php
  2. $posts = array ( 'post_field_1' => 'somevalue',
  3.  'post_field_2' => 'somevalue' );
  4.  
  5. if ( is_array( $posts ) ) {
  6.  foreach( $posts AS $name => $value ){
  7.  $postValues .= urlencode( $name ) . &#092;"=\" . urlencode( $value ) . '&';
  8.  }
  9.  $postValues = substr( $postValues, 0, -);
  10.  $method = &#092;"POST\";
  11. } else {
  12.  $postValues = '';
  13. }
  14.  
  15. $request = &#092;"$method $target$getValues HTTP/1.1rn\";
  16. ?>


Zaprawde powiedam Ci wszytko jest w google i manualu php.net smile.gif
Go to the top of the page
+Quote Post
Supol
post 26.04.2005, 22:09:04
Post #5





Grupa: Zarejestrowani
Postów: 33
Pomógł: 0
Dołączył: 20.09.2003

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


hmm.. czyli mam prozumiec ze cookies mam wyslac $postValues a nie jako $request.?
Go to the top of the page
+Quote Post
hwao
post 27.04.2005, 12:40:57
Post #6


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




Sorka zapomnialem kawałku
  1. <?php
  2. if ( $method == &#092;"POST\" ) {
  3.  $lenght = strlen( $postValues );
  4.  $request .= &#092;"Content-Type: application/x-www-form-urlencodedrn\";
  5.  $request .= &#092;"Content-Length: $lenghtrn\";
  6.  $request .= &#092;"rn\";
  7.  $request .= $postValues;
  8. }
  9. ?>


Poczytaj manuala i komentarze tam masz calosc "tego"
http://pl.php.net/fsockopen
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 05:46