Beginner PHP Tutorial - 65 - Getting Visitors IP Address

  Рет қаралды 98,821

thenewboston

thenewboston

Күн бұрын

Пікірлер: 53
@awesome_ashu
@awesome_ashu 10 жыл бұрын
For those who are getting ::1, just use 127.0.0.1 instead of localhost in your URL.
@IrakliKhakhviashvili
@IrakliKhakhviashvili 10 жыл бұрын
thanks
@Arachne26
@Arachne26 10 жыл бұрын
I was just wondering about this, thanks..
@AbhayaSinghPandey
@AbhayaSinghPandey 8 жыл бұрын
I was wondering how is it possible. Anyway kudos .
@abdulqudoos7707
@abdulqudoos7707 7 жыл бұрын
i didn't get ip address, if i use 1 equal mark if($ip=$ip_address) i get this your IP, ::1 has been blocked
@abdulqudoos7707
@abdulqudoos7707 7 жыл бұрын
can u help me
@captainhampton
@captainhampton 13 жыл бұрын
@mezigpo Some people might be stumbling on these videos for the first time. It's a nice short introduction, much better than many other youtubers who have some elaborate introduction. Plus, he's providing free and helpful content so give him a break.
@MrMarkgyuro
@MrMarkgyuro 5 жыл бұрын
really useful videos : ) a php beginner
@BaliLandandVilla
@BaliLandandVilla 12 жыл бұрын
::1 is IPv6 address equal to 127.0.01 as in IPv4
@fakecheese94
@fakecheese94 13 жыл бұрын
Wouldn't it be better if you used: if (in_array($ip_address, $ip_blocked)) { die('Your IP address has been blocked.') } ??
@BlueDragon-tl2qx
@BlueDragon-tl2qx 8 жыл бұрын
great job but one issue that I am facing is there away you can tell me how I can put into my MySQL to get visitors IP addresses when they come on my site that would be really helpful other wise this way would be kinda useless I like this because I can ban them in 3 different ways which I consider more protected anyways any help would do thank you
@xXxBladeStormxXx
@xXxBladeStormxXx 12 жыл бұрын
Oh god! The ::1 has returned to haunt me D:
@bigfuzzydog
@bigfuzzydog 11 жыл бұрын
Question. I have a couple websites hosted by Blue Host - the CMS is wordpress. I do want to block a few IIP addresses - does anyone know where I should put it on my sites? Would it be Appearences - - >Editor? I know - pretty stupid question.
@charismatubagus
@charismatubagus 13 жыл бұрын
@Lindhe94 So How can I make it to display 127.0.0.1?
@a1appbuilder
@a1appbuilder 6 жыл бұрын
I have ip_address in my database bigint 50 . Using your code I get the $ip_address = $_SERVER['REMOTE_ADDR']; now how do I get it in ip_address to save it in the database. mysqli_query($conn,"INSERT INTO history (date,action,data,ip_address)VALUES(NOW(),'Login','$user')");//or die(mysqli_error());
@mohammedrameeson7076
@mohammedrameeson7076 3 жыл бұрын
welcome Is this code okay?
@TheRijintube
@TheRijintube 11 жыл бұрын
For those who have their IP address as ::1 use this as $ip_blocked = array('::1','100.100.100.100');
@BUDDY_786
@BUDDY_786 6 жыл бұрын
Can i execte this as localhost/index.php ?
@TheJ0Ost
@TheJ0Ost 12 жыл бұрын
Why, if there is a better way, do you tell us this way to get an IP adres?
@Madgod711
@Madgod711 11 жыл бұрын
Switch the address in the address bar from localhost/dir/file.php to 127.0.0.1/dir/file.php
@jorossbarredo
@jorossbarredo 12 жыл бұрын
in IPV6 (internet protocol version 6), ::1 is the same as 127.0.0.1
@oscheka
@oscheka 7 жыл бұрын
how to convert from ::1 to 127.0.0.1?
@himelsarkar137
@himelsarkar137 6 жыл бұрын
Change cpanel ip adress random ly ?
@jamietjeh
@jamietjeh 10 жыл бұрын
you can also use this as an replacement of an .htaccess file by dooing as followed hope this helped some of you out :)
@shekelboi
@shekelboi 8 жыл бұрын
thx, great vid
@drcod3r329
@drcod3r329 7 жыл бұрын
we could use in_array function much easier :)
@xXxGnuVirusxXx
@xXxGnuVirusxXx 12 жыл бұрын
trust me he does
@mezigpo
@mezigpo 13 жыл бұрын
OK.. we already know you're Alex .. You don't need to say it on every video in the beginning
@NourdinOuboullah
@NourdinOuboullah 13 жыл бұрын
good tutorial i like it
@xxiRaQiAtheistxx
@xxiRaQiAtheistxx 12 жыл бұрын
Hi Alex :) Thank you Alex
@austinch
@austinch 13 жыл бұрын
mine is ::1 not 127.0.0.1
@xXxBladeStormxXx
@xXxBladeStormxXx 12 жыл бұрын
These videos aren't meant to be seen as a series. While they can be seen in order, they are meant for reference. So yeah, he does need to say that at the beginning of every video. And even if he didn't have to, it's his video so it's his choice. So don't try to teach him what to do, just watch the video say thanks and GTFO.
@johnmart09
@johnmart09 11 жыл бұрын
my ip address is ::1?
@shohanur_rifat
@shohanur_rifat 6 жыл бұрын
mine too
@SuperNerdPride
@SuperNerdPride 12 жыл бұрын
I think not everyone watches every single video, made by Alex..
@lindhe
@lindhe 13 жыл бұрын
@tletable On Ipv6 127.0.0.1 is ::1 (learned from thenewboston btw)
@ShinichiKudo012
@ShinichiKudo012 11 жыл бұрын
u simply don't use arrays for things like that bro , u use database , so it's a bit complicated than that ... , u need to access database , get the blocked IPs , then u can compare the given IP to the blocked IPs from database , then there u go
@redpilledpatriot6868
@redpilledpatriot6868 6 жыл бұрын
Welcome!
@redpilledpatriot6868
@redpilledpatriot6868 6 жыл бұрын
@RahilWazirAli
@RahilWazirAli 12 жыл бұрын
100.0.0.0.0.0.0.0.0.0.0.0.0.1
@redpilledpatriot6868
@redpilledpatriot6868 6 жыл бұрын
Welcome!
@RahilWazirAli
@RahilWazirAli 12 жыл бұрын
NOOB search on the google
@redpilledpatriot6868
@redpilledpatriot6868 6 жыл бұрын
Welcome!
Beginner PHP Tutorial - 66 - Better Way to Get Visitors IP Address
5:31
Beginner PHP Tutorial - 73 - Setting PHP Sessions
7:44
thenewboston
Рет қаралды 191 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Beginner PHP Tutorial - 75 - Creating Cookies with PHP
7:42
thenewboston
Рет қаралды 140 М.
Russian secret base uncovered / Russia abandons the region
14:15
NEXTA Live
Рет қаралды 730 М.
Beginner PHP Tutorial - 61 - $_SERVER Variables: Script Name
8:17
thenewboston
Рет қаралды 117 М.
Сборник Эксклюзивов 2024 - Уральские Пельмени
1:33:24
Уральские Пельмени
Рет қаралды 1,5 МЛН
Top 10 Linux Job Interview Questions
16:04
tutoriaLinux
Рет қаралды 2,4 МЛН
Beginner PHP Tutorial - 67 - Detecting a Visitors Browser Part 1
6:36
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 209 М.
Beginner PHP Tutorial - 77 - File Handling: Writing to a File
6:56
thenewboston
Рет қаралды 100 М.
Beginner PHP Tutorial - 70 - Working with $_POST Variables
8:14
thenewboston
Рет қаралды 95 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН