Connecting Arduino to PHP

Hello all! I'm having a hell of a time trying to figure out this problem, because I haven't worked with PHP before (although I'm anxious to learn more) and I figured you all would be the best people to ask. I'm trying to connect a signal (laser detection) from an arduino board to the computer, where it will go through my website and run a cURL code (the code submits a message to the Slack app, and is currently run using a button on my site). I have my cURL code finished, as well as my arduino IDE code, but I'm having a major disconnect between the two. I know that I have to connect the arduino to the site using a serial port, but I'm pretty out of my league. A colleague gave me a 700-line code called PhpSerial that I was told to include on the code for my site to "open the ports, keep them open and constantly scan for input", but I've had no luck with it at all. I'm increasingly frustrated and could use any advice you could give me! Keep in mind I am completely new at PHP and a lot of what I've researched for the last 2 weeks has gone over my head!

I know that I have to connect the arduino to the site using a serial port

Well, you can't do that. You can connect the Arduino to the server, but that might not be possible, depending on who owns the server.

But, you can not connect the hardware to software.

Do you have an ethernet shield?

A PHP program runs on the server. If your PC is running the server then it can connect to the Arduino over the regular USB cable. I do this with a small web server program that I have developed in Python using the Bottle web framework. I assume you can do the same thing with PHP.

If the server is somewhere else and your PC is just accessing it through your browser I don't know if it would be possible to access a serial port from (say) Javascript running in a browser. I have never tried and I have never researched the concept.

If your Arduino has an Ethernet shield or some WiFi capability (e.g. an ESP8266 module) then it could communicate directly with the server. And your browser could indirectly access the Arduino data via the server.

...R