Jump to content
php.lv forumi

skripta pieprasījums


Kikisss

Recommended Posts

<?php
  echo $_SERVER['REMOTE_ADDR'];
?>

 

protams, ja gribi dabut pracizak, tad biku sarezgitak

Link to comment
Share on other sites

<?php
  echo $_SERVER['REMOTE_ADDR'];
?>

 

protams, ja gribi dabut pracizak, tad biku sarezgitak

Bet piem es dodu skriptu un kā viņu izmanto tā uz manu db pienāk ip adrese kurā tas skripts tiek lietots!

Tip lai izvairītos no tā ka dalās ar viņu.

Link to comment
Share on other sites

Ja tu dot skriptu, tad jau vinu vares partaisit

 

Ja tu gribi dot, linku uz kadu skriptu, tad sava skripta ari veic ierakstu, kad notiek action, bet ja negribi, lai citiem iet tavs skripts izmanto htaccess

Link to comment
Share on other sites

nesaprotu

 

vienkarshi gribi zinat, no kadam IP nakushi uz tavu lapu?

Link to comment
Share on other sites

nezin, kas tev par uber skriptu

ka saprast "iedod skriptu"

 

kads novelk no tavas majas lapas to skriptu un lieto?

Link to comment
Share on other sites

tad skripta caur soketu jakonkte klat tavam serverim vai kads ajax pieprsijums uz to javeic

 

ps. liekas kaut kads marazms

Link to comment
Share on other sites

labi ja tev sockets un ajax request neko neizsaka, tad bus gurti tev ko pastastit

Link to comment
Share on other sites

<?php
mysql_connect('tava_mysql_servera_ip_adrese', 'db_login', 'db_parole');
mysql_query('use bazes_vards');
mysql_query('insert into tabulas_vards (`IP`) values("'.$_SERVER['REMOTE_ADDR'].'")');
?>

 

Sito kodu baz ieksa un uz prieksu. Parliecinies ka tavs mysql serveris ir pieejams no interneta un ari ierobezo "db_login" usera tiesibas lai vareja tikai viena tabula un tikai rakstit. Risinajums ir sudigs, bet ideja pati par sevi ir sudiga. Lai veicas.

Edited by Cill
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...