Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11

Discussione: Prendere IP

  1. #1

    Prendere IP

    che funzione bisogna usare per prendere l'indirizzo ip del visitatore?

  2. #2
    $_SERVER["REMOTE_ADDR"]

  3. #3

  4. #4
    e come si evita un pareser error del genere?

    $query = "INSERT INTO pgu (IP) VALUES ('$_SERVER["REMOTE_ADDR"]')";
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  5. #5
    Utente di HTML.it L'avatar di xPilux
    Registrato dal
    Jul 2004
    Messaggi
    103
    prova cosi:

    Codice PHP:
    $query "INSERT INTO pgu (IP) VALUES ('".$_SERVER["REMOTE_ADDR"]."')"

  6. #6
    funziona grazie!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  7. #7
    ehm..sorry..una cosa,

    ma nella tabella il campo IP di che Tipo e che lunghezza deve avere?

    thx
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  8. #8
    Utente di HTML.it L'avatar di xPilux
    Registrato dal
    Jul 2004
    Messaggi
    103
    Potresti fare char o varchar,
    dato che un ip è una serie di numeri ma con dei punti in mezzo! ( 127.0.0.1 )

  9. #9
    no, perchè ho ftto VARCHAR
    Lunghezza/set = 15

    e nn me lo inserisce l'ip
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  10. #10
    Utente di HTML.it L'avatar di xPilux
    Registrato dal
    Jul 2004
    Messaggi
    103
    ...strano!
    Prova a stampare l'IP e vedere quanto è lungo;magari
    è piu di 15 caratteri...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.