Jump to content

CroNiX

Staff Alumni
  • Posts

    1,469
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by CroNiX

  1. Since these are coming from a directory and not the database, I'd suggest using array_chunk(). Here's some pseudocode. Hopefully you can see what's going on. //grab the page number from the url, if not set assume it's page 1 ​$page_number = (isset($_GET['page'])) ? filter_input(INPUT_GET, 'page', FILTER_SANITIZE_NUMBER_INT) : 1; $folder = 'img/'; $filetype = '*.*'; $files = glob($folder.$filetype); //you'll need this total to determine how many "page" links to build $count = count($files); $per_page = 10; //show 10 images per page //split up the files array into chunks of 10 (number per_page) $files = array_chunk($files, $per_page); $files = $files[$page - 1]; //grab the files for this page from the chunked array based on index //now cycle through $images and display them ... //determine how many pages there will be based on total images and $per_page $total_pages = ceil($count / $per_page); //build your page links based on how many pages there are ... As far as the "&nbsp", search for it. Its not coming from this code. It is missing the ";" at the end so that's why it's showing up.
  2. Ah, so you don't have access to the actual mail logs, which is most likely where the bounce notice from gmail would be. It doesn't make sense that gmail is blocking bluehost if you are able to send to gmail from the send_message.php but not your other pages. Presumably these are all being sent via bluehost. We use SendGrid with a unique IP for outbound emails and it works great. You're not at the mercy of your hosts IP reputation. If 500 different domains are sending through Bluehost and some of them are bad/spammy/fishing/etc, it could affect delivery of everybody else. We send about 4,000 emails/day without issue. Once in a few months there will be a problem with a specific domain that we can get resolved directly, but google will be NO help to you unless you have a business account. They'll just point you to about 10 huge webpages of info and tell you to make sure your emails are in compliance with their rules. Here's some good info: http://www.rackaid.com/blog/gmail-blacklist-removal/
  3. One of these lines is probably wrong. Look at the $dir/$file concatenation, they're different with one adding a directory separator. $fileinfo = pathinfo( $dir . $file ); if (filemtime( $dir .'/'. $file )==FALSE) {
  4. If you have access, you should check your mail logs.
  5. When google doesn't accept an email from me they bounce it and I receive it back with the reason why they didn't accept it. Usually they say it "looks spammy". Do you receive bounced emails back to your inbox?
  6. The webuser (user server is running as, not your account user) must have user or group file permissions to access/read/write on a dir outside of your webroot. Imagine the security implications if anyone on the server could just read/write any file they wanted.
  7. Well that's a bit different than your original question where you were asking about simulating interacting with the page...clicking, etc. If you just wanted to get the images from some webpage on a different server (not yours), you could do what I mentioned in my #2 answer. 1) Use simple_html_dom to retrieve the webpage 2) Use simple_html_dom to traverse the webpage and extract the image urls 3) Use CURL to request each of the images from the other server and save them
  8. it's pretty easy http://php.net/manual/en/function.urlencode.php
  9. What reason did they give for blocking?
  10. You're sure they're actually going through? It might be successfully sent but gmail might be rejecting it after that. I'd check your mail logs.
  11. if (strtolower($category) == 'admissions') { Convert it to lower case and check against lower case
  12. PS in the future please post code between [ code] //code here [ /code] tags
  13. Because you only tell it to insert 2 values: $bnt = mysql_query("INSERT INTO tablename (first, second) VALUES ('$ced', '$erg')")or die('Error: '. mysql_error() ); $result = mysql_query($bnt); That should probably be in your loop where you are retrieving $ced and $erg from $_POST.
  14. $myemail = "MY GOES EMAIL HERE"; //change to your email address mail($myemail, $subject, $message, 'From: ' . $myemail); it's mail(to, subject, message, headers) where "headers" can also be additional headers like "reply-to" but needs to contain at least the From header. Additionally, mail() returns a boolean to tell whether it was successful or not. So you can do something like: if (mail(to, subject, message, from)) { echo 'email sent'; } else { echo 'there was a problem sending the email'; }
  15. You still haven't stated exactly what the error you get is, only that it "made reference to the php.ini". Copy/Paste the exact error message here.
  16. you're welcome
  17. What makes you think the problem is with php.ini? That gets installed/created when you install php, so it should be there. Do you get an error message or something?
  18. 1) No. PHP is run on the server and all it does is output. Once it sends the output it's done. JS runs in the users browser and can interact with the page. 2) not sure what you mean. It can't click on links, but you could scrape anything out of a page on a different server, like images. You'd grab the webpage using CURL or something, and then parse it grabbing the urls for images, and then requesting and saving the images on the server.
  19. Haven't tried on iPad, but you have the #footer-content set at 1000px width. Try 100%
  20. I believe it would if you added L,R to EACH RewriteRule. Perhaps that's not what you meant since the htaccess you just posted doesn't do that.
  21. That could cause several redirects since it will stop at the first L and redirect.
  22. Not clear on what you mean. There isn't any php in that form.
  23. http://www.uploadify.com/
  24. ('$_POST[select2]')"; Look at your associative array there, you don't have quotes around 'select2'
  25. http://jsfiddle.net/4ycg79v8/ Changes: Added class "rotator" to parent div Removed all "hidden" classes from child elements (creates by itself so less HTML to start with) Works with any number of children without additional JS changes Fixed improper child element IDs (can't start with a number)
×
×
  • 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.