riky Posted April 5, 2005 Report Share Posted April 5, 2005 Cik zinu uz php ir funkcija ip() vai getip() utt. bet taas sniedz infu tikai par servera, vai arii lietotaaja ruutera ip! Varbuut var apvienot JavaScript ar php un dabuut lokaalo ip. Mosh kaads zin kaa palaist backgroundaa "ipconfig" no cmd un nolasiit infu, bet peec tam paarmest to ip uz php taalaakai apstraadei. Link to comment Share on other sites More sharing options...
hmnc Posted April 5, 2005 Report Share Posted April 5, 2005 REMOTE_ADDR? X_FORWARDER_FOR? Link to comment Share on other sites More sharing options...
riky Posted April 5, 2005 Author Report Share Posted April 5, 2005 REMOTE_ADDR? X_FORWARDER_FOR? 16030[/snapback] Hmm, bet vai tad tas spees apiet ruuteri? Diez vai, ja tam buus ugunssiena, vai arii es kljuudos? Bet ja buutu JavaScripts, tad to laizh cauri peec lietotaaja pieprasiijuma, un ja tas iespeejams, tad Javascripts, jau veelaak kompii var dariit ko vien grib. Ah, hmm., ir tak veel arii iespeeja kaut ko meeginaat ar VBscriptu, nav jau tas labaakais variants, bet meeginaat var! Ir kaads, kas zin kaa ar to nolasiit no taas cmd.exe to infu, vai no kaut kurienes citur? (Plz, nedusmojieties, ja par daudz prasu, taa kaa nezinu pashas taas scriptu funkcijas, sintaksi, bet galva ta straadaa, un uzrakstu visu jau pats, kaa gribeetu, tik nemaaku kodaa realizeet. Luudzu paliidziet.) Link to comment Share on other sites More sharing options...
Venom Posted April 6, 2005 Report Share Posted April 6, 2005 $usrIP=(isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:''). (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']!='unknown'?' fwd '.$_SERVER['HTTP_X_FORWARDED_FOR']:''). (isset($_SERVER['HTTP_CLIENT_IP'])?' client_ip '.$_SERVER['HTTP_CLIENT_IP']:''). (isset($_SERVER['HTTP_VIA'])?' via '.$_SERVER['HTTP_VIA']:''); Link to comment Share on other sites More sharing options...
riky Posted April 6, 2005 Author Report Share Posted April 6, 2005 <?PHP$usrIP=(isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:''). (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']!='unknown'?' fwd '.$_SERVER['HTTP_X_FORWARDED_FOR']:''). (isset($_SERVER['HTTP_CLIENT_IP'])?' client_ip '.$_SERVER['HTTP_CLIENT_IP']:''). (isset($_SERVER['HTTP_VIA'])?' via '.$_SERVER['HTTP_VIA']:''); print $usrIP ?> nop, shitais neder, tas paraada tikai aareejo redzamo ip, taa pat, kaa dc++ raada. Piem man ir 80.233.250.200, bet taa ir tikai aareejaa, bet gribu lai paraada iisto, taa kaa man raadaas caur ipconfig t.i. 10.2.0.12, lokaalaa tiikla ieksheejaa ip adrese. Link to comment Share on other sites More sharing options...
Kavacky Posted April 6, 2005 Report Share Posted April 6, 2005 Hmm, izskatās, ka tu par daudz gribi dabūt un no visiem sapizģīt, pats nifiga nezinot. Link to comment Share on other sites More sharing options...
Venom Posted April 7, 2005 Report Share Posted April 7, 2005 a MAC negribētu? tas ir fantastikas apgabals :) Link to comment Share on other sites More sharing options...
riky Posted April 7, 2005 Author Report Share Posted April 7, 2005 a MAC negribētu?tas ir fantastikas apgabals :) 16081[/snapback] :D nop nevajag :D Link to comment Share on other sites More sharing options...
Dooling Posted April 8, 2005 Report Share Posted April 8, 2005 nu rodas jautajums.. kapeec tev tas vajdziigs. tjip, ja jau tev servers, caur kuru tu tiec pie neta, tad tu to lapu uz aaru nevari dabuut - tikai caur servaku. un ja tu uzliec uz servaka savu lapu, tad ip radisies lokalaa tiikla. (taas pashas 10.0.2.2 un 10.0.2.*) | || bet man ir tiesiibas, kaa vienmeer, kluudiities. :ph34r: Link to comment Share on other sites More sharing options...
Delfins Posted April 8, 2005 Report Share Posted April 8, 2005 $txt = `ipconfig`; un matchojam vajadzigas rindas $searchPattern = '/IP Address.+([\d]{3}\.[\d]{3}\.[\d]{3}\.[\d]{3})/'; preg_match_all($searchPattern,$txt,$matches); print_r($matches); Link to comment Share on other sites More sharing options...
Recommended Posts