Hello, my name is alkarnur. I just started learning PHP a few months back and I'm really excited about it 🙂
I normally solve my own PHP problems, but most of the time, they're very basic, seeing as how I'm a beginner really.
I'm working on a personal site and there's a link that should be different when I visit my site using a specific OS, or a specific UserAgent, or a specific IP address.
So normally, the link points to site A, but if any of the above three conditions is true, it points to site B.
As an example: Normally, the link points to site A, but if I visit my site from a Mac (OS test), or an iPhone or iPad (UserAgent test), or from my home (IP test), I want it the link to be changed to point to site B.
I already did a somewhat extensive search but all I got was fragments and I'm not sure how to put them together.
Can anyone please help me?
If you'd like I can post the pieces of code I found in my search 🙂