Jump to content

ajetrumpet

Members
  • Posts

    195
  • Joined

  • Last visited

Everything posted by ajetrumpet

  1. that's always a good idea, ian. good for you.
  2. did you check the spam folder? additionally, perhaps you need more lines of REQUIRE() code, like in my script? don't quote me, ian, I'm no PHP expert.
  3. ian, I worked with a veteran on this very issue for 3 days a long time ago. we found out that the package I downloaded from github was coded incorrectly. he had to use another method to put the body of the HTML message together. can you possibly get anything from this script of mine? https://drive.google.com/file/d/1Cj8RIDPOUe8hWUBUQjtjGUjKgQG2u3t_/view?usp=sharing the new code from him, that he wrote to solve the problem of me not getting the message and/or the message coming incorrectly was this portion: $temp_HTML = "<!DOCTYPE html> <html> <head> <title>Website Form Submission</title> </head> <body> <p>$email_body</p> </body> </html>"; he also had to add a few other lines of REQUIRE() function code.
  4. hey you guys, I have a bunch of files on a server and I had to populate each one with this code: <?php include("https://www.domain.com/r/pagevisit.php"); ?> however, I'm getting an error, which I understand: This gentleman on SO suggests that doing this is not the right way, and will always throw the error: https://stackoverflow.com/a/23285648 This site is getting quite large now, and I might just have to throw the content of all the files into a DB and pull it out when each page is requested. however, for now everything is just PHP files sitting on the server. so the question => is there anyway I can keep the include() code I currently have on each page, or does each file have to have it changed to the relative URI path? if I can keep it the way it is, where is the configs to change it? I might not even have access to it since this is shared hosting. thanks! Adam
  5. I won't when i get your solution implemented. I currently have a pw on the root via the method I just showed you, using goDaddy's tool in that image. but that doesn't work, as stated.
  6. I *do* have the option to password protect different directories, however I tried this long ago and it doesn't work because if I protect the root and then protect a subdir underneath that root with another pw, the pw for the root is used for both. the pw for root takes precedence over every other one. thus, goDaddy's tool can't do this. see attached image, or here: https://drive.google.com/file/d/1RF8KnyP5tKzdG-R0Axrr116E-L-iYeFr/view?usp=sharing
  7. that looks like something similar to what I need, req. however, a part of that page says this: this website is hosted with GoDaddy, and I have no idea if I have access to that dir or those appropriate files. this is on a shared server, and goDaddy tells me that access to deep level config files under that kind of hosting account is not possible. the root dir on this website, per an FTP client, is: public_html however, there *is* a directory underneath that root called: .htpasswds the apache version they have is 2.4.33 it looks like we're on the right track then here, no?
  8. YES. sorry for the long winded answer, requinix. I know you tech experts like it simple in the manner of "question-answer". 😃
  9. well here's what it is, requinix.... .....I have a site that has "index.php" files inside each subdir. so the architecture looks similar to this: www.domain.com => www.domain.com/concept1/program1/ => www.domain.com/concept1/program1/advanced => www.domain.com/concept1/program1/tutorials => www.domain.com/concept2 ....(same as above) so....someone will contact me that is trained in program1 and want to learn more about that program. I would then want to give them access to these dirs ONLY: www.domain.com/concept1/program1 www.domain.com/concept1/program1/advanced www.domain.com/concept1/tutorials but I would *not* want that same user to have access to these dirs: www.domain.com www.domain.com/concept2 so....is this even possible with PHP/MYSQL?? in general, the password given to this examples user I'm referring to in this post would be the exact same password given to anyone that wanted to learn about program1. thus, it would *not* be a different password for each person. but rather, a different password for each *dir* and its associated *subdirs*. thanks requinix!
  10. req, I'm sorry it took forever for me to get back to you on this. to answer you....this page will be looked at by many people. I need a different UN and PASS for each directory. "subdirectory", that is, that, is each nested underneath the root site name: e.g. => www.domain.com I'm assuming the simple-stupid apache method for this would not be appropriate, correct? this is a bit more complex than "stupid" methods....thanks.
  11. sorry you guys, but another question here from a mildly-talented PHP user..... I started designing a website for someone with wordpress, however like all 3rd party apps, it's very limited in what it can do when a need arises that is complex in nature, which is what I have. I'm using GoDaddy as a hosting company and their cPanel tool can't do this, so I must use PHP or something similar to get it done. Here's what I've got: => I have many dirs and subdirs on my site. the reason for this is to partition/separate out many files that cover a wide variety of topics. so the addresses look kind of like this: > www.domain.com/content/software/ms-office/ms-access > www.domain.com/content/software/ms-office/ms-access/advanced/code-samples > www.domain.com/content/software/ms-dot-net/visual-studio What I would like to do, because the site won't be available to the general public for a few months yet, is give people who want to know what the site is about a preview of what they will see in 3 months. But these people always have only one discipline/focus for their job. So I'd like to let them look at the content on the site that is only relevant to their expertise (for instance, like above, the "ms-access" dir), because I can't be showing them the other free resources offered by the site owner, especially if the owner brings in revenue for his business using that knowledge. So in the above example, how could I use PHP/MYSQL to issue separate usernames and passwords for 2 different people => 1 that wants to look at ms access content (they would only have access to "ms-office/ms-access" and "advanced/code-samples"), and 1 that wants to look at visual studio content ("ms-dot-net/visual-studio")?? Ideally what I'd like to do is only have to issue one password *per* software category dir, and have that password work for any other nested dirs lower than that. So in the above example, giving credentials for access would allow the user to view any page on, or nested below the dir "ms-access". If they try to view any file in any other dir, regardless of whether it is higher or lower on the directory tree, I want to block them. Can this be done? GoDaddy's tool can't do it. It would also be nice if I could issue a universal redirect to a landing page/login page as the result given to a user that tries to access any given page on this website for the first time, if they typed in a literal URL instead of going to the homepage. I hope you guys can help me figure this out, or maybe point me to some good internet resources where I can learn how to do it myself. thanks! (by the way, I know I can use PHP/MYSQL to produce dynamic pages with query strings, but I just chose this method to make it easier for the next developer to follow, because they're not that intellectual)
  12. thank you very much, requinix! I will look into this when I get back to it. I got sidetracked, which is why I'm so late getting back to you about your response to me.
  13. hey guys, I'm going to write another site in PHP/MYSQL and I'm pretty sure people will be looking at it while on the go. I searched for the topic here via this: https://forums.phpfreaks.com/search/?q=detecting%20mobile%20device Do any of you experts remember any of those threads? At the moment I don't have time to search them by 1 at a time and scan the posts. can anyone point me to some good online resources that can give me some insight on how professional developers write code to detect a mobile device’s page request, and then determine its screen size so the data can be displayed in a presentable manner? I'm assuming it's out there. thanks!
  14. you know Barand, I actually DID try that! and it resulted in the exact same thing I'm complaining about in this thread. I also got that from w3schools.
  15. ok guys, I sent the deployable to the requester with a workaround, so this is no longer relevant, however I will respond to all you guys: => yes i was trying to APPEND. so I had that wrong as I was using "w". thanks! => 'fputs' was embedded inside an ECHO statement in an attempt to see the number of BYTES fputs throw into the text file. I got that debugging method from www.w3schools.com => I'm not sure what "showing the source" of the blank page would do for me. I'm not even sure what you mean by that. and how could 'fputs' output HTML? that doesn't make sense. isn't 'fputs' purpose to stream files, regardless if the process is "i" or "o"?? it's an I/O function, isn't it? => and YES, of course I know the difference between a freakin boolean and string! i've been doing this job for 12 years! 😃 => Berand, I really should have gone with your advice....if ($validation) { .....because it makes more sense. I just picked a string in the form of "true/false" because it came to mind first. no other reason. => NotSunFighter ------- you're not far from me. where do you work? would you be interested in connecting somehow? this whole thing was simply an illustration for someone who wanted to validate product registration by checking a product key against keys that were purchased. I used a combination of ms access, VBA code, HTML, CSS and PHP to accomplish the goal by sending the user to a webpage where they could validate their product by inputting their product key and then using PHP POST[] to do the work. I know it's not the easiest way to do it, as the same can be accomplished with javascript with less coding, but that's what I had in my knowledgebase from years ago so it was easy to send to the person quickly. It can easily be done in ms access as well. but I've always hated that program because every release is extremely buggy. and for good reason...MS makes no money with it so they obviously don't pay much attention to it's development. If I was MS, I wouldn't care either.
  16. what's wrong with it? is it spose to be 2 = signs or 3? am I spose to check a boolean without the string in quotes? I tried it with 2 = signs even, and that didn't work either. sorry, I get confused sometimes with the difference between 2 and 3 = signs and the comparisons they're spose to make! Berand, I don't have an ini file yet on this hosting plan. I will create one, which is ".user.ini", spose to be put in the root folder. I'll get to it when I have time. I'll let you know how it goes. thanks.
  17. Berand, I dont' believe I can access the php.ini file. i remember a discussion between us about this a while back. Do you remember that? Here is what my setting is in the phpinfo() page on my domain: however, another line of the file says this:
  18. I tried this, gw: if ($validation == "true") { //file_put_contents("ValidationsRedeemed.txt", $validationKey . "|", FILE_APPEND); $handle = fopen("ValidationsRedeemed.txt", "w"); echo fputs($handle, $validationKey . "|"); fclose ($handle); } else { //user entered a product key that is not recognized. tell them to try again. echo "<script>alert('The product key entered is not valid.'+'\\n\\n'+'Please try again.'); window.location.href='test.php';</script>"; } I put this line at the top of the php script page: error_reporting(E_ALL); when I run the script, I get a blank page. there is no error log file on the server in the directory either. ????
  19. can someone give me a push here? I've tried "file_put_contents" and "fputs" and neither one works for me. I'm running PHP on an IIS server and a windows hosting plan. PHP version is 7.3.1 I believe. here is my code: if ($validation = "true") { file_put_contents("ValidationsRedeemed.txt", $validationKey . "|", FILE_APPEND); //$handle = fopen("ValidationsRedeemed.txt", "a"); //fwrite($handle, $validationKey . "|"); //fclose ($handle); } else { //user entered a product key that is not recognized. tell them to try again. echo "<script>alert('The product key entered is not valid.'+'\\n\\n'+'Please try again.'); window.location.href='test.php';</script>"; } thanks!
  20. I will get back to you guys about what i've implemented once I figure out what I'm doing and have read through enough content to be confident. thanks much everybody!
  21. thank you sunfighter. I will check those out. moreover, I have watched a few episodes at the following channel as they cover some topics that I have not yet been exposed to:
  22. does anyone have an example of new code that is used this day in age for combining js and PHP to produce dynamic content on a webpage? I have looked at this from w3schools: https://www.w3schools.com/php/php_ajax_database.asp but I believe that XMLHttpRequest is really old. If I rememeber my reading right, it was replaced by fetch() a long time ago. I think i understand everything that is on that tutorial page, but I would love to see a video tutorial on this subject. can anyone here point me to such a resource?
  23. I'm not sure I should bother the other dude about where he found the error maxx. I will send him a PM though and inquire about it. We went thru so many trial and errors though that it's very possible he just edited the source code to try and make it work with the method we were trying at the time. but i'll look into it and if there is indeed an error, i'll post at github about it.
  24. I'm not sure which link ur referring to. the ones from my previous latest post both work fine for me. maxx, I received help from an expert on another site getting PHPMailer to work. we worked on it for 2 full damn days! I was getting error and error message after trying to use SMTP and then NOT using SMTP, etc, etc....what ended up being discovered was that apparently, according to the expert helping me, the code in one of the files from the github download package was written incorrectly. he fixed it and eventually he gave me a solution that was not spammed out when received by the gmail mail server. thanks for all ur input here guys.. Adam
  25. guys, I have apparently found a solution using PHPMailer. The solution, which took 56 posts to figure out, which might not be actual solution afterall, is here: https://www.phphelp.com/t/phpmailer-email-message-sent-to-spam-folder-in-gmail/30494
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.