PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Request
What i want is a webpage that only can be viewed once per ip.. This script doesnt work can someone please help me rewrite this ?
The problem
When i vist the page for the first time with my ip it will print out Hello World. But later when i try reaching the page from another ip it give's me google instead of Hello world that is what needs to be fixed if you can see the problem please tell me how to modify it
Php read user ip
php write user ip to file if already exists close connection
Your header isn't within parenthesis, so is outside of your if statement, so it will always do the header redirect. Also, I don't know why you are doing an fputs in your foreach if you are writing the IP address later on.
Id like to say this much about the users and this forum. It's the best , best answering time , nice'st users , best reply's.
God bless you all for helping me . I hope you will get rich and all your dreams will be answered. As for me my dream has been answered