Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> fsockopen i cookies...
Supol
post
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() (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
hwao
post
Post #2


Developer


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




Mozna (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Taki ładniutki nagłówek (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) nic tylko go przetowrzyc i juz sie ma (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
(zobacz sobie w naglowkach jak to wyglada:) )
Go to the top of the page
+Quote Post
Supol
post
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 ? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) a moze ktos ma jakis artykul na ten temat? (wysylanie przez fsocketopen? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) )
Go to the top of the page
+Quote Post
hwao
post
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 (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
Supol
post
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
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
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.09.2025 - 04:36