-
Who's Online 2 Members, 0 Anonymous, 1,751 Guests (See full list)
All Activity
- Past hour
-
Expedia® is a leading travel booking platform in the dial number 24/7 OTA States (+1║888║876║1063) ‣ ⇢, helping travelers access exclusive discounts on flights, hotels, rental cars, vacation packages, and cruises.for Express Deals™ and the Name Your Own Price® tool, Expedia® delivers savings to millions annually. Need help now? Call the Expedia® Customer Service Number™ at (+1║888║876║1063) ‣ ⇢. Their Expedia® 24 Hour Customer Support™ line is always available. Expedia® allows you to: Book flights (one-way, round-trip, multi-city) Reserve hotels with real reviews and savingsconc Find unbeatable bundled vacation packages Rent cars with flexible pickup/drop-off Book cruises from top cruise lines Add local tours and activities Need booking help? Just Expedia® Speak With an Agent™ by calling (+1║888║876║1063) ‣ ⇢. Expedia® Mobile App Features™ Download the Expedia® app™ to: Access exclusive mobile-only deals Receive real-time trip alerts View digital tickets and itineraries Modify bookings easily Chat with support or call (+1║888║876║1063) ‣ ⇢ directly Expedia® Account & Trip Management™ Your Expedia® account lets you: View/change/cancel current trips Manage traveler info and saved payment methods Print receipts and confirmations Apply credits or promo codes Track VIP rewards Login issues? Call Expedia® Customer 24 Hour Support™ at (+1║888║876║1063) ‣ ⇢. Expedia® VIP Loyalty Program™ Join Expedia® VIP™ to get: Exclusive hotel discounts Faster customer support access Free hotel upgrades at VIP properties Personalized booking benefits Questions? Call (+1║888║876║1063) ‣ ⇢. Expedia® Best Price Guarantee™ If you find a better deal after booking, Expedia® offers: A refund of the price difference Coverage on flights, hotels, and packages A 24-hour claim window Need help submitting a claim? Dial the Expedia® Live Agent Phone Number™ at (+1║888║876║1063) ‣ ⇢. Expedia® Flight Policies and Airline Rules™ When you book flights through Expedia®: Most flights have a 24-hour free cancellation window Refunds/credits depend on fare class Basic fares may be non-changeable Airline baggage and check-in rules apply Check your fare rules by calling (+1║888║876║1063) ‣ ⇢. Expedia® Hotel Booking & Check-In™ Hotel bookings on Expedia® include: Deep Express Deals™ savings Flexible or non-refundable booking types Full check-in instructions in email Filters for amenities, price, and reviews Have a hotel issue? Call the Expedia® 24 Hour Customer Support™ at (+1║888║876║1063) ‣ ⇢. Expedia® Vacation Packages™ Bundle and save with: Flight + Hotel Flight + Hotel + Car Customized multi-person itineraries Call (+1║888║876║1063) ‣ ⇢ to modify or check your package. Car Rentals on Expedia® Expedia® partners with all major rental car companies: Choose cars by type, price, or provider Many bookings allow free cancellation Add extras at checkout Call (+1║888║876║1063) ‣ ⇢ to modify your rental. Expedia® Cruise Bookings™ Cruise offerings include: Top lines like Royal Caribbean®, Carnival®, NCL®, and more Cabin upgrades and onboard credits Add pre-/post-cruise hotel stays Book excursions in advance Questions? Call (+1║888║876║1063) ‣ ⇢. Check-In & Boarding Pass Help™ Flights: Check in on the airline’s site/app Hotels: Follow itinerary check-in details Cars: Show license & credit card at pickup Call (+1║888║876║1063) ‣ ⇢ if you need help accessing check-in details. Travel Insurance & Protection Plans™ Offered during checkout, plans may include: Trip cancellations, delays, or emergencies Baggage loss or damage 24/7 emergency assistance Call (+1║888║876║1063) ‣ ⇢ for claims or questions. Travel Alerts and Entry Restrictions™ Stay updated on: Visa rules and travel bans COVID-19 airline testing requirements Local safety guidelines Entry protocols by country Questions? Contact (+1║888║876║1063) ‣ ⇢. Billing, Refunds & Payment Issues™ Expedia® accepts: Major cards, PayPal®, Apple Pay®, gift cards Split payments for packages Travel credits and promo codes Call (+1║888║876║1063) ‣ ⇢ for payment support. Special Assistance & Group Bookings™ Available services include: Wheelchair-accessible flights and hotels Help for hearing/visually impaired travelers Group bookings for 8+ passengers Pet and service animal policies For support, call (+1║888║876║1063) ‣ ⇢. Expedia® Account Security™ Security features include: Two-factor authentication Encrypted payment systems Real-time fraud alerts 24/7 fraud support To report issues, call (+1║888║876║1063) ‣ ⇢. Top 30 Expedia® FAQs What is the Expedia® Customer Service Number™? Call (+1║888║876║1063) ‣ ⇢, the official support line. Can I talk to a Expedia® representative 24/7? Yes—call (+1║888║876║1063) ‣ ⇢ and say “agent.” How do I cancel my trip on Expedia®? Log in or call (+1║888║876║1063) ‣ ⇢ for help. Can I change my hotel or flight date? Yes, if your booking allows changes. Call (+1║888║876║1063) ‣ ⇢. How do I use Expedia® Express Deals™? Select “Express Deal” during checkout. How do I access my itinerary? Use the app or log in to your account. What is Expedia®’s refund policy? Depends on fare/provider. Call (+1║888║876║1063) ‣ ⇢ to confirm. What if I never received a confirmation email? Call (+1║888║876║1063) ‣ ⇢ to resend. Can I cancel a non-refundable booking? Sometimes you may get credit. Call (+1║888║876║1063) ‣ ⇢ to explore options. How do I file a hotel complaint? Call with your confirmation number at (+1║888║876║1063) ‣ ⇢. Is Expedia® phone support available? Yes—24/7 at (+1║888║876║1063) ‣ ⇢. Can I add a traveler or upgrade a seat? Possibly—call (+1║888║876║1063) ‣ ⇢ for details. How long do refunds take? Usually 7–10 business days after approval. Can I book for someone else? Yes—enter their info at checkout. What is the cancellation window? Most bookings allow free cancellation within 24 hours. Can I use a promo code? Yes—apply at checkout or call (+1║888║876║1063) ‣ ⇢ for help. What is Expedia® VIP™? A loyalty program with exclusive discounts and perks. How do I redeem a gift card? Apply the code during checkout or call (+1║888║876║1063) ‣ ⇢. What if I was overcharged? Call billing support at (+1║888║876║1063) ‣ ⇢. Are pets allowed in Expedia® hotels? Use the “pet-friendly” filter or call to confirm. Does Expedia® offer student discounts? Not directly, but Express Deals™ save big. Can I book last-minute? Yes—use “Tonight-Only Deals” or call (+1║888║876║1063) ‣ ⇢. How do I report fraud? Call support immediately at (+1║888║876║1063) ‣ ⇢. Can I cancel a cruise booking? Yes, but policies vary. Call (+1║888║876║1063) ‣ ⇢. Are there fees to change my flight? Depends on airline fare. Call (+1║888║876║1063) ‣ ⇢. Does Expedia® offer travel protection? Yes—during checkout or by calling (+1║888║876║1063) ‣ ⇢. How do I track a flight? Use your airline app or Expedia® itinerary. Is Expedia® phone support available 24/7? Yes—call (+1║888║876║1063) ‣ ⇢ any time. How can I modify account info? Log in or call (+1║888║876║1063) ‣ ⇢. Can I reach Expedia® via email? Phone is fastest—use (+1║888║876║1063) ‣ ⇢ for urgent help. People Also Ask For: Expedia Cancellation & Refund Policy: Step By Step Complete Guide – TTP Expedia Change Flight Policy : Step By Step Detailed Guide – TTP Expedia Customer Service: Your 24/7 Guide To Support Via Live Agent – TTP Expedia Group Travel: Seamless Bookings For 10 Or More Passengers – TTP Expedia Guide: Booking, Changes, Cancelations, Support, Refunds, Mobile App & More – TTP Expedia Name Change – How To Fix Or Modify Your Name On Tickets – TTP Expedia Reservations Desk: A Step By Step Guide Explained – TTP Expedia Seat Upgrade Guide – How To Upgrade Fast, Policy & Support – TTP
-
I finally reached the endgame in POE2, but it feels overwhelming with maps, bosses, and resource management. I came across a detailed poe2 end game guide that really helped me understand mapping strategies and progression paths. Anyone else following guides to get through the late game smoothly?
-
poe2currency joined the community
-
⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹ Expedia®™ USA Premier Support: Live Agent Contact Guide ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ When accounting tasks stall or last-minute glitches arise, connecting with a live Expedia®™Premier Support Number ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ can be the quickest way to resolve issues. Whether you’re facing setup problems, sync errors, or billing concerns, this detailed guide covers Expedia Premier support methods, focusing on the USA hotline ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ and beyond. :mag: Why a Live Person Is Essential ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫║ While Expedia’ AI handles many basic tasks, certain complex financial issues require real human help: :warning: Data migration or corruption :bar_chart: Account syncing & banking errors :money_with_wings: Refunds and subscription issues :gear: Technical bugs, crashes, or login lockouts :file_folder: Clarifying tax or payroll configuration A real agent at ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ offers tailored assistance that automation can’t. :telephone_receiver: Official Expedia®™ USA Customer Service Number ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ The main Expedia™ contact numbers are: :calling: ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ (Live Agent Hotline – USA) :white_check_mark: Toll-Free | 24/7 | Expert Help | Expedia Premier & Online :compass: Step-by-Step: Talk to a Real Agent at Expedia™ ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ Dial the Number: ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ Listen to Prompts for product type (Expedia Online, Premier, Payroll) Choose options like “technical support,” “subscription,” or “billing” Say “agent” or press “O” to skip automation Verify with your email, company ID, or phone number Get connected to a Expedia® expert and explain your issue clearly :heavy_check_mark: Pro Tip: Call before 9 AM or after 8 PM for lower wait times. :iphone: All Expedia®™ Contact Methods – Full Overview Expedia offers multiple contact channels, each with different benefits: :telephone_receiver: Phone Hotline – Best for Complex or Urgent Issues :phone: ⇠⟦+1⟧⇢ ⊹888 ⊹ 876⊹ 1063⊹or ║〔+1〕↬ 888⊹876⊹1063↫ :white_check_mark: Talk to a live U.S.-based expert 24/7
-
Anny7 joined the community
-
Fair comments but no, it’s an unconditional declaration and in the same scope. #baffled
- Today
-
A couple of possibilities spring to mind. Are the definition and the usage of the variable inside the same scope; for example - is it used inside a function but defined outside that function? Is the definition inside a conditional block of code (eg if() )so that it has not been executed because the condition was false?
-
Hi folks, first time here although I've been coding in PHP for more years than I can remember. I'm in the process of moving some legacy code from v7.4 upto 8.2, which has the following declaration: $pri_sec_replaced = FALSE; However, when executed I receive the following warning: PHP Warning: Undefined variable $pri_sec_replaced in ... Am I missing something fundamental here? As far as I'm concerned the boolean has been declared and set. Thanks in advance.
-
WilkoUK joined the community
-
itsplaypro joined the community
- Yesterday
-
LinOracy joined the community
- Last week
-
What's the underlying OS, and what MUA (SMTP program) is running? /var/log/maillog /etc/maillog - Sendmail, etc. /var/log/exim4/mainlog, /var/log/exim4/paniclog - Exim No idea if you're using QMail; but logfiles are usually very insightful in these cases.
-
Sounds reasonable.
- 4 replies
-
- ssl
- ssl certificates
-
(and 1 more)
Tagged with:
-
It's either an issue with the existing code, or an issue with your server environment. Because the script is generating a 500 error, this is something that needs to be debugged. Optimistically, this probably a sub 4 hour job, but I have no idea what that means for freelancer or other sites of that type. There's also the issue of preparation of an environment for testing the code, and version control. Assuming none of those things are in place, is the developer going to YOLO on your production server? In order to even figure it out, you probably want a developer with strong sysadmin skills who can diagnose what is going on with your hosting environment. So I'd build your estimate with a range from 4-8 hours.
-
We would need to see some code, as well as a link to the documentation. One obvious thing to try would be to open the connection using "r+" instead of "w+".
-
bdttxoilaclinktv joined the community
-
I'm working on a new project to control my hottub. I'm designing using a RasPi 3+ and an 8 chan relay board. I have a php function that does "$fd = fopen (/dev/ttyUSB0, w+) and fprint (fd, "0x%s", an octal string); and relay 1 turns on, turns off - as does 2 thru 8. on off on off on... life is good. My problem: Mfg info says 0xFF will return the status of all 8 relays as in "00100110". I have tried all sorts of combinations of fprint 0xFF which seems to go OK. Then fgets, fscanf, fread and the code just hangs. Has anyone gotten this to work? Can someone offer some help? Thanks in advance. (I'll owe u a beer)
-
Need help with PHP and ImageMagick problem
GMann1984 replied to GMann1984's topic in PHP Coding Help
Also, what would be an estimated budget for completing this project? Freelancer is recommending the following options: Micro ($30 - $250) and Entry ($250 - $750). -
Need help with PHP and ImageMagick problem
GMann1984 replied to GMann1984's topic in PHP Coding Help
Thank you for the detailed information regarding this issue. So, is this simply a matter of hiring a programmer and having them update the code on the form to PHP v8.3 and imagemagick, or is there something further that needs to be done? Are there any recommendations for where to find a programmer? I've had success with Freelancer.com in the past, but that was awhile ago and was only for smaller fixes. Any further assistance or recommendations would be greatly appreciated. -
Beyond mac's insights and salient comments, the code snippet you provided tells us nothing, as it is not the code you are using. The only way to gain insight into this is having detailed logging to review when the mailer freezes. I'd also suggest scanning the release notes in regards to the phpMailer releases, to check if there are any Breaking changes you might have missed, or things that are now handled differently between the two versions. There are 2 likely possibilities based on your comments: There are some emails that are causing issues when delivered. The way the code is written (and the environment involved) uses up available resources (network connections, database handles, or other available memory). Many companies use phpMailer so I am doubtful that there is an issue with it that would be trivially obvious, but regardless of that, you need detailed debugging which will be best facilitated by the injection of an object that implements PSR3 as described in the phpMailer source code here. If you don't already have that, here's a bit more on setting that up: After the instantiation of the PHPMailer object, that would involve a call like this: $mail->Debugoutput = new myPsr3Logger; A lot of projects use the well regarded monolog library which allows for logging to be integrated into many different logging systems, but in your case, just insuring it is writing to a log file on your system would be sufficient. As for some trivia, the author of monolog is the same guy who created PHP's dependency management tool Composer. The documentation states that the only log level that will be used is the 'Debug' level.
-
It is the scripts in the subdirectory named boatlettering. There are 2 I see being called: The image src runs boatNamePreviewImage-new.php load_image2.php gets called when changes to the parameters are made. Obviously things on the server changed and this is probably because your code uses an ancient and long end of life version: php5.6. On top of that, it relies on the imagemagick library, so any issues with the version of imagemagik that supported that old version of php will also cause it to no longer function. I don't see this as being a quick fix, and there is very little people here could do for you, even with the source code, as your existing code is antiquated, and needs to be updated to run under supported versions of php and the imagemagick library, as well as running on a supported operating system, which it most likely did not previously, or now that it has been updated, will no longer support the old code.
-
What you will see if you open that PHP file in a text editor such as Notepad.
-
Need help with PHP and ImageMagick problem
GMann1984 replied to GMann1984's topic in PHP Coding Help
What is the "source code"? -
We can't help unless you share the source code of the script. All I could say at this point is the script outputs a 0 byte image.
-
I have a boat name designer that uses ImageMagick to generate the image. It has been working fine for years and then suddenly stopped working this morning. When I clicked on the link, instead of the designer I got a "500 server error". I contacted the Host provider and they were able to get the designer back online but the image preview did not work. Here is our communication from oldest to newest: ================================================= The website has a form that should generate an image, but it fails to do so, everything else works except for that particular component. The customer wanted to revert to a backup, but it did not work. Opened the ticket to take a deeper look. ================================================= After investigating the issue, we were not able to find the root cause of the Image preview issue. At first, there was an issue with the suPHP module as it was not installed on the shared host. I had to edit a line of code in the `.htaccess` file so the 500 error you called for went away. Adding a `#` to every line of the block so it was disabled: ``` # #suPHP_ConfigPath /home/boatlett/public_html/boatlettering/ # # #order allow,deny #deny from all # ``` Before that, I also installed the module to prevent any code modifications. This created issues on the server overall, so I had to revert to the previous setting. The logs are not giving us any explicit cause of the issue. So the best option will be to contact a developer so they have a better solution to the issue with the form, as it looks like it should run with PHP 5.6, according to this line: ``` AddType application/x-httpd-ea-php56 .php .php5 .phtml ``` ================================================= Unfortunately there are no errors being displayed, so we would have nothing to work off of in reviewing the 'BoatLetteringPreviewForm.php' script. No errors are shown when checking the F12 developer console, and no errors are being logged in the site's home directory. In such a case, you would need to contact the script's developer to determine why the script is not functioning properly. If the script requires some specific PHP version or extension, we could set the site to use it, though we would not be able to determine the script's requirements simply by looking at it. ================================================= At this point I suggested they reinstall the ImageMagick module as I recalled this issue happened a few times in the past and was fixed rather quickly by doing that. Here is their reply: ================================================= I checked the module and tried to reinstall, but I do not think it will take any effect. I did found old similar tickets for the same problem and noticed we also suggested a developer to look into the same issue further. (But reinstalling fixed the issue so no need to contact a developer) You can try to change the PHP version and see how it goes, but a developer would be indeed more suited to check the issues here. ================================================= It seems to me they don't want to reinstall ImageMagick because they don't think it will do any good. Should I push them on the matter? If nothing more than to eliminate it as a cause? I was hoping someone could take a look at the page: https://www.boatlettering.net/boatlettering/BoatLetteringPreviewForm.php and give me an idea of what's going on and why the image generation portion would suddenly stop working without making any changes to it? Sincerely,
-
That was the question originally posed as I interpreted it. This is why the OP posted interest in the ESP32, which is a line of 32 bit Microcontrollers. They are typically used for IOT projects, and I don't think are a good match for this. A Raspberry pi, Orange Pi, or even a GMTek Mini PC are all a lot more viable given the OP's professed direction in this project, involving an OS capable of running an HTTP server and app server.
-
AI tools are usually pretty good for getting started with a simple task like this. I googled the relay board you mentioned and found a PDF that lists the data required to turn the relays on or off. I feed that into ChatGPT and asked it to describe the protocol to get an understanding of it. I then asked it to generate a web form using PHP that can be used to turn the relays on or off. <?php // relay_control.php // === Function to build command === function relayCommand(int $relay, bool $state): string { $header = 0xA0; $relayByte = $relay & 0xFF; $stateByte = $state ? 0x01 : 0x00; $checksum = ($header + $relayByte + $stateByte) & 0xFF; return pack('C4', $header, $relayByte, $stateByte, $checksum); } // === Handle form submission === $message = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $relay = intval($_POST['relay'] ?? 1); $state = ($_POST['action'] === 'on'); $cmd = relayCommand($relay, $state); $hexCmd = strtoupper(bin2hex($cmd)); // Example: write to USB device (uncomment when you know the device path) // $fp = fopen('/dev/ttyUSB0', 'wb'); // if ($fp) { // fwrite($fp, $cmd); // fclose($fp); // } $message = "Relay $relay " . ($state ? 'ON' : 'OFF') . " → Command: $hexCmd"; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Relay Control</title> <style> body { font-family: Arial, sans-serif; padding: 20px; } form { margin: 20px 0; } select, button { font-size: 16px; padding: 5px 10px; margin: 5px; } .msg { margin-top: 15px; font-weight: bold; } </style> </head> <body> <h1>LCUS-8 Relay Control</h1> <form method="post"> <label for="relay">Relay number:</label> <select name="relay" id="relay"> <?php for ($i = 1; $i <= 8; $i++): ?> <option value="<?= $i ?>"><?= $i ?></option> <?php endfor; ?> </select> <button type="submit" name="action" value="on">Turn ON</button> <button type="submit" name="action" value="off">Turn OFF</button> </form> <?php if ($message): ?> <div class="msg"><?= htmlspecialchars($message) ?></div> <?php endif; ?> </body> </html> Sounds like a project that you could do with a raspberry pi computer + the relay board. Might be able to go even simpler if you didn't need to host the control interface on the device itself and instead just communicated with it over the network or a serial port.
-
how are you invoking this? is the code looping over data, and if so what is the code with the looping? approximately how long was the execution time for each of the segments of sent emails? you are using exceptions for errors. when using exceptions, none of the discrete error checking logic will ever get executed upon an error and should be removed. when using exceptions for errors, unless you are doing something special with the error information, you should not catch and handle exceptions in your code. instead let php catch and handle any exception, where php will use its error related settings (error_reporting, display_errors, and log_errors) to control what happens with the actual error information, via an uncaught exception error. php's error_reporting should always be set to E_ALL. if you are invoking this via a browser, you should set display_errors to ON, so that any php detected errors (which will include any uncaught exceptions) will be displayed. if you are invoking this via a cron job/scheduled task, you should set log_errors to ON, so that any php detected errors will be logged.
-
I just updated PHPMailer from version 5.1 to 6.10.0. I was successfully sending small batches of emails today, so I thought everything was great. Tonight I went to run a job that was going to send a couple thousand emails out and it stopped about a third of the way through. It just stopped sending out emails after about 369 emails. I started it again from the point where it quit and it only made it through the next 500ish. After starting from that spot it made it through the list. There are no errors messages, no error logs, no debugging logs. I never had anything like this happen when running v5.1. Nothing else changed in my code, data files, etc. So I am wondering if there is some limiting factor with the newer PHPMailer? Does it take more memory? I'm looking for ideas on how to debug this. Any relevant differences between PHPMailer 5.1 and 6.10.0? Suggestions how I should debug it? Other than the first 4 lines of code below, nothing has changed. I find it hard to believe it is a code issue since this has been running for many years without issue. Ideas where I should start? require_once 'include_files/PHPMailer/PHPMailer_v6.10.0/PHPMailer/Exception.php'; require_once 'include_files/PHPMailer/PHPMailer_v6.10.0/PHPMailer/PHPMailer.php'; require_once 'include_files/PHPMailer/PHPMailer_v6.10.0/PHPMailer/SMTP.php'; $mailer = new PHPMailer\PHPMailer\PHPMailer(true); $mailer -> IsSMTP(); $mailer -> Host = 'smtp.mandrillapp.com'; $mailer -> SMTPAuth = true; $mailer -> Username = 'myusername'; $mailer -> Password = 'mypassword'; $mailer -> SMTPSecure = 'tls'; $mailer -> Port = 587; $mailer -> IsHTML(true); $mailer -> AddReplyTo('My Email'); $mailer -> FromName = "My Name"; $mailer -> From = 'My Email'; $mailer -> AddAddress('Your Email'); $mailer -> Subject = 'My Subject'; $mailer -> Body = 'My Message'; if ($mailer -> Send()) { } else { print "Mailer Error: " . $mailer->ErrorInfo; }
-
Did I miss where a question was asked? What was the source .py being copied here, in case that's necessary information? Input arguments are rather awkward, like gizmola said something like $_POST or even $_GET will probably be more appropriate. Obviously the exact nature of the $on/$off stuff is irrelevant to operating the board so it can be rewritten into any style. For the board, seems odd that you're actually supposed to include a "0x" in the buffer? Otherwise since this is a device, a mere file_put_contents is likely sufficient - w vs. r+ shouldn't matter.
-
The script does no parameter count checking, which isn't a great idea. First thing you would want to do is check $argc == 3. I'm assuming you know that $argv[0] is the script name, so typically you would check the count and display a "usage {$argv[0]} relay# 0|1 [off|on]\n", or something similar if it's not the right count. With that said you stated you wanted to do this with an html page, so probably it would be better to just have a "self posting" form script where you use html to display the controls, and set the 2 parameters based on whatever UI decisions you make. In that case, you would want to get the 2 parameters via the $_POST[] superglobal array, perhaps with html form elements named $_POST['relay'] and $_POST['state'] which you can set to be 0 or 1. You certainly in either case want to do some bounds checking (cast to int or use intval) and insure that the relay is in the range of 0-7. It would also be good if there was a way to determine the pre-existing state of the system. With that said, given the circumscribed set of functions, and purpose of this, I would suggest that you consider the alternative of a board based controller, perhaps with an lcd keypad. With a "mini-pc" you have all the issues of how your web app is going to be displayed, although if your device has wifi, you could design the html/css to be responsive, and control it using a pc or phone. Sounds like a fun and interesting project.