Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. You can read this post similar issue. http://forums.phpfreaks.com/topic/140116-solved-warning-extract-functionextract-first-argument-should-be-an-array/
  2. How about this. <!doctype html> <head> <title>Test</title> </head> <body> <style> #Container{ margin: 0 auto; width: 100%; } #left{ color:white; background-color: blue; height:300px ; width: 100px; max-width:30%; display:inline-block; } #center{ color:white; background-color: blue; height:300px ; width: 100px; max-width:30%; display: inline-block; } #right{ color:white; background-color: blue; height:300px ; width: 100px; max-width:30%; display: inline-block; } </style> <div id=”Container” align="center"> <div id="left"> column 1 and some extra </div> <div id="center"> column 2 and some extra </div> <div id="right"> column 3 and some extra </div> </div> </body> </html>
  3. Loop your array and either unset that result or can create a new array excluding those with blank values for links. Personally i would do checking for when are creating the arrays, maybe you are finding javascript links, maybe need to fix relative links, but obviously is something in your scraping code that should get attention.
  4. Dale summed it up pretty good. It seems like your team are not really coders, if they are the ones that are going to be making changes then an already made popular cms may be the way to go. Yes at times will be a pain to incorporate some custom additions, but overall the popular cms do have the ability to do it. Joomla always updates their code along the way which means at times you will have to edit your code to match theirs. Just the mere fact can get a lot of free plugins and not have to pay people to make it is a plus. Another plus is it's well documented and popular. This would enable new coders to jump right in fairly fast. Your top developer wants to use joomla, make them happy, ha ha. On the other hand if your team consisted of all coders, while you can surely make a full blown cms and all your customizations, there is also the time needed to create and test all of it. If time is not an issue and everything will be properly coded I feel having your own cms is a good thing. Tons of work involved. I have used and developed with both wordpress and joomla since they came out. It seems every version will have a hiccup, so expect to make changes to remedy those. I'll tell you one of my personal experiences. The team consisted of just myself. Wordpress was the cms. Created piles of custom themes,functions and plugins to get it all to work exactly as I wanted. Every so often i would find something not working as expected, and usually after an update (no surprise there). After 3 years of using wordpress that project I found out their prepared queries just didn't cut it for my needs, they were really slow requests, and the built in search was horrible for my needs. I was always fighting their filters. Attracts every spammer in the world. Essentially my database grew too large for wordpress to handle. I ended up writing my own cms, used only what I needed and wanted and am very glad i did it. I feel good in knowing my code will be the same unless I changed something. Is mostly basic php and created all my own functions, I tried to only use the basic php functions I felt would not get deprecated in the near future. Overall I feel Joomla and Wordpress are fantastic as an out of the box solution. If all the customizations can be accomplished and works fairly fast...that's great. Since you say are unfamiliar with joomla. You can make a custom theme and include the functions right inside it without needed plugins. Or do functions in the theme with additionally making either a huge single plugin, or many small ones. You also have the ability to include custom scripts outside the cms coding. Nothing is set in stone, basically using something like Joomla gives you a big headstart with managing users and additional plugins.
  5. A lot of those registered accounts not activated are probably spammers.
  6. More than likely is a rule in your hosts file redirecting www.adobe.com to 127.0.0.1 1. Open "My Computer" 2. Open Drive C 3. Open Windows folder 4. Open System32 folder 5. Open Drivers folder 6. Open Etc folder 7. Double-click the hosts file and choose to open using Notepad when you're asked. look for a line something similar below and delete it: 127.0.0.1 *.adobe.com ** if you get "access denied" errors when trying to save the file, try openning the hosts file using "Run as Administrator". this issue happens usually when you're working on Win Vista/7 with UAC turned on.
  7. Try the following code. <?php function MD4Hash($post_password) { // Convert the password from UTF8 to UTF16 (little endian) $post_password=iconv('UTF-8','UTF-16LE',$post_password); // Encrypt it with the MD4 hash $MD4Hash=bin2hex(hash(md4, $post_password)); // Return the result return($MD4Hash); } //you may want to do additional checking on the post values $post_password = trim($_POST["password"]); echo MD4Hash($post_password); ?>
  8. Most of that book is how to install things like mysql,apache,php. Using local packages like wamp,mamp,xampp or doing manually. then all about phpmyadmin and how to use it. To be honest is very little of useful php information there, besides all the important php stuff you can find at http://php.net
  9. There was more, also you don't need a semicolon after the curly braces. <?php $folder = "/home/a9865238/public_html/images/"; if (is_uploaded_file($HTTP_POST_$FILES['filename']['tmp_name'])) { if (move_uploaded_file($HTTP_POST_$FILES['filename']['tmp_name'], $folder.$HTTP_POST_FILES['filename']['name'])) { Echo "File uploaded"; } else { Echo "File not moved to destination folder. Check permissions"; } } else { Echo "File is not uploaded."; $name=$_FILES['file']["name"]; $path=$_FILES['file']["tmp_name"]; $destination="upload/".$name; move_uploaded_file($path,$destination)?"file moved":"file not moved"; } ?>
  10. You are using fancy quotes $folder = “/home/a9865238/public_html/images/”; Change the quotes $folder = "/home/a9865238/public_html/images/"; You have to pay attention to the correct quotes when copying code from websites.
  11. I know you said without js, but here it is if needed that. <script type="text/javascript"> function open_pages(){ window.open("http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2011"); window.open("http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2012"); window.open("http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2013"); } </script> <a href="javascript:open_pages()">View your pages</a>
  12. if ($password == "password") { echo file_get_contents('http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2011'); echo file_get_contents('http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2012'); echo file_get_contents('http://www.myrealwebsite.com/Clients/Smitherton/SmithertonFamily2013'); }
  13. You can't do it using header, is not made for that purpose. header() maybe try to include() them, or iframe them
  14. As for the form is a hidden field <input type="text" name="secret" style="display: none;"> or <input type="hidden" name="secret" value=""> Then can do a check and take whatever action you desire, die,exit,redirect...up to you. <?php if(isset($_POST['secret']) && trim($_POST['secret']) !=''){ die(); } ?> As for checking words or if is a url, this can be done so many ways and could even depend where and how you would like to check them. Make a banned words list, could be a text file, database results or even a created array...possibly even in a function Check if the word/characters exist using functions such as preg_match() , preg_match_all(), in_array() Now take some sort of action to prevent them from doing something like redirect to the Thank You page as you said. I'll write a simple form and script checking from a text file <form action="" method="post"> Name: <br><input type="text" name="name"><br> Message: <br><textarea cols="40" rows="5" name="message"></textarea><br> <input type="text" name="secret" style="display: none;"> <input type="submit" value="Submit"> </form> <?php //check if post form was submitted if(isset($_POST)){ //check if hidden value was used if(isset($_POST['secret']) && trim($_POST['secret']) !=''){ die('Hidden value was used'); } //implode all the post data and check against bad words in a text file $my_bad_file = "bad.txt"; //make a new file and insert any bad items one per line, Phrases work as well if(!file_exists($my_bad_file)){ die("Can't find $my_bad_file"); } $check_content = implode(",", $_POST); $bad_content_array = array_map('rtrim', file($my_bad_file)); foreach ($bad_content_array as $bad_content) { $bad_content = strtolower($bad_content); if (strpos(strtolower($check_content), $bad_content) !== false) { die('Ban value was found'); } } echo $_POST['name'].": ".$_POST['message']; } ?>
  15. nvm, read the code wrong in my response
  16. I self taught myself php. Tried it when first came out, was very little documentation or any sort of help forums. I just got familiar at php.net and started to make my own functions and small scripts. When I needed to do something special, I would see if anything can do the job at php.net with default functions, or if not make my own. Once you do this a little and actually write code it gets easier, following other peoples code is usually a lot harder to do. Comment a lot, use variable and function names that are meaningful to you, will be easier down the road. I'd like to point out that there is a ton of old crusty outdated code on the net, a lot are deprecated or simply just bad practice. Merely reading through others problems and solutions here can help you on the right track.
  17. Ha, didn't even realize was a different person cyberrobot
  18. If you are breaking in and out of html/php code, then you must use the php opening and closing tags <?php and ?> ?> <input type='text' name='keywords' size='60' value='companyname' maxlength='10' /> <?php
  19. You use $_GET['user']; , so that would be http://site.com/script.php?user=their_name Have no idea your url location.
  20. I can confirm that your form part is fine and sends data. If you are using the same php code as your first post, you never use email in your form therefore nothing else in your php script will work if(isset($_POST['email'])) {
  21. ^^^ What he wrote. You showed us a huge form with piles of css style. You need to explain what your issue is.
  22. To me is a preference, I guess as long as you stick to one style and not mix and match is good.
  23. Welcome to the site. Is always a few tricks or better ways to do it.
  24. Welcome to the site. I self taught myself, I never used sites like this, found them later on. Lucky you!! Don't worry about asking questions, people here are more than happy to answer them.
  25. As for developing with php and mysql, well just think what server specs are and the closer you come to match that the better the experience. Whatever laptop you get should have adequate space, a half decent cpu, more than enough memory, the rest are just luxuries. Try Notepad 2 for the editor. Or even something like netbeans if you need an ide and code in a few languages. BTW, did you ever consider installing something like ubuntu server, and also a desktop gui, windows versus linux has some differences.
×
×
  • 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.