Jump to content

dagnasty

Members
  • Posts

    66
  • Joined

  • Last visited

    Never

Everything posted by dagnasty

  1. This is not a browser caching problem. apache, PHP Version 5.1.6 My dynamic pages were cached on the server and when I edit them to dynamically output new content, it displays page content from before the edit. I am not sure what is causing this problem, but I'm sure it's a file caching feature on the server. Any ideas what addon or module could be causing it? Note: No matter how many times I edit the file, it never changes. Also, I made some adjustments to the system time as it was a few hours off but not sure in which direction. Could the server be thinking the new file is older than the cached?
  2. I say caching but I believe I may mean buffering
  3. No , it's optimized very well. The delay isn't an issue as it's caused by network delay when grabbing several large pages through cURL. Do you know the page caching setting off hand? I'm using apache and latest php
  4. no this isn't what i'm looking for but I will add this to my notes to research. the answer is a php.ini or apache setting, but I can't find it.
  5. If I have a script that takes about 10 seconds to complete parsing to the page, what setting do I change so that the page loads as php parses it? I've looked and searched. I know it exists, but it's slipped my mind as to where it is and what it's called.
  6. I have mirrors to my site and 1 reacts differently than the rest because it's on a different host. It runs scripts that can take a few seconds to load, sometimes around 10 seconds. When a script is parsing on the other servers the page loads as it parses, instead of after all the script parsing is done. Is this an apache or php setting, and what's it called?
  7. for examp http://www.serverspy.net/site/search/server.html?a=85.232.244.14:29070&g=5
  8. sites such as serverspy do it, and for your game too. The problem is that it's in their format. For 25 I'll write you a script that strips and rips and puts it in a format that you can place on your web site. It's very time consuiming and sometimes trivial. in case you would rather not, just learn regexp techniques. Go in with your helmet on if you don't know it already.
  9. because it deals with filse size. ex. 23.42 MB 3.1 GB 32.34 KB 
  10. The reason I'm asking is because it will be done about 200 times in my script and they are large numbers.
  11. What if my number is 546000 would it be quicker to divide by 1000 or to insert decimal where I know it goes with string manipulation?
  12. Is it quicker to place a decimal in a number with string manipulation rather than divided by a certain number and round?
  13. I don't really want to look through it, but if you want you can use my old script as a reference. [code=php:0] <? if (isset($contactsubmit)) { $myemail = "email@email.com";           $i = 0; if(!$visitormail == "" && (!strstr($visitormail, '@') || !strstr($visitormail, '.'))) { $invalidemail = 1; $i += 1; } if (empty($visitor)) { $invalidvisitor = 1; $i++; } if (empty($notes)) { $invalidnotes = 1; $i++; } if ($i == 0) { $todayis = date("l, F j, Y, g:i a") ; $subject = "Contact"; $notes = stripcslashes($notes); $ipi = getenv("REMOTE_ADDR"); $httpagenti = getenv("HTTP_USER_AGENT"); $message = "$todayis [EST] \n Message: $notes \n From: $visitor ($visitormail)\n Additional Info : IP = $ipi \n Browser Info: $httpagenti \n"; $from = "From: $visitormail\r\n"; mail($myemail, stripcslashes($subject), $message, $from); echo "Message sent. Thanks!"; $ismailed = 1; } else { echo "Error. Check below"; } } ?> <? if (empty($i) || $i != 0) { if (!isset($ismailed)) { ?>         <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">                       <?php if ($invalidvisitor == 1){ echo "<font color=red>"; } ?>             Name:             <?php if ($invalidvisitor == 1){ echo "</font>"; } ?>             <input type="text" name="visitor" size="35" />             <?php if ($invalidemail == 1){ echo "<font color=red>"; } ?>             <br>             Email:             <?php if ($invalidemail == 1){ echo "</font>"; } ?>             <input type="text" name="visitormail" size="35" value="<?php echo $visitormail; ?>" />             <?php if ($invalidnotes == 1){ echo "<font color=red>"; } ?>             <br>             <br> Message:<br>             <?php if ($invalidnotes == 1){ echo "</font>"; } ?>             <textarea name="notes" rows="4" cols="40"></textarea>             <br />             <input type="submit" value="Send" name="contactsubmit" />                   </form> <?} } ?> [/code]
  14. Thanks guys. Your information was very helpful. The script is a VERY VERY VERY resource intensive one. 'nother quick question: Does doing an unset on an array or a multidimensional array completely unset it?
  15. Maybe I haven't lost track of what's happening yet... Would this mean mounting each network drive to the server? I've done this for my home network so I could provide myself a login to access all the files as if they were on the actual server. This server was within the same network as the network drives, however. Without a dedicated server with which you can manage all the mounting, this can prove to be very difficult. Hopefully I'm still on the same track. Just trying to provide some insight.
  16. Yeah, I know. Probably a very common question. I've had the answer before, but I completely forgot it, and finding information on it is tough for me. Google turns up too many pages with the same words but different subject. When doing preg_match how do I tell it to get the string between the first part of the pattern and the first finding of the second part of the pattern Ex. [code]preg_match("/<div>(.*)<\/div>/", $lookhere, $output);[/code] When this code looks at something like [code] <div>first div</div><div>second div</div> Thanks guys. I really feel like an idiot asking this question. [/code] what I get back is [code]first div</div><div>second div[/code] How do I tell it to get string before only the first </div> it finds instead of the last?
  17. I have 3 questions that I've been unable to find understandable google results for. 1. I have a variable that contains the HTML of a page and was wondering if it'd be better to unset() it after I'm done with it, or leave it as is. Will the time spent doing the unset() not be worthwhile beceause of the time it takes the execute the function on a variable the string size of an HTML page? 2. I have a multidimensional array and want to count the (not sure with terminology, so I'll use and X) X part of this array, how would I go about it? ex: $array[0][X]; 3. This question has something to do with regexp but I don't feel it's worth posting a query in the regexp section. When doing a preg_match is there a way to only get the information between a pattern instead of returning the pattern and the stuff between it. ex: [code] $lookhere = "stuff here <tag>the good stuff</tag> stuff there"; preg_match("/<tag>([^`]*?)<\/tag>/", $lookhere, $output);[/code] this would turn out "<tag>the good stuff</tag>" but what I want is just "the good stuff" Thanks.
  18. Well I could do a preg_match_all and get the ones I want. The Nth I will be looking for will be the nth array number.
  19. This has been driving me nuts a week now. Let's say I have HTML similar to this: [code] <tr><td>Name</td><td>Age</td><td>5</td><td>Date</td></tr> [/code] I want to get the data between an Nth occurance of a tag. In english-like psuedocode: get string between 3rd occurance of <td> and </td> which would be 5. Thanks guys.
  20. Apparently I've been away from PHP for too long. The word I was looking for was return. I feel like an idiot.
  21. What's the word to terminate a function? Google keeps turning up exit and die, but I just want to exit the function, not cancel script execution.
  22. Does anyone have any idea how I could set cookies for multiple domains through 1 page? I'm all out of ideas. I've tried using frames and iframes and it works in firefox but not in IE.
  23. Ahhh that's it. I was reading the wrong part of the setcookie page and thought the boolean was for something else. Do you have any idea how I'd go about setting a cookie for a domain other than the one currently visited? It's not letting me do it right now.
  24. Correct. Multiple domains, not subdomains. can anyone confirm this? what about through javascript?
  25. According to php.net this is supposed to work correctly setcookie("cookie", $value, time()+31556926, "/", ".website.com", 1); but doesn't, however this does: setcookie("cookie", $value, time()+31556926); The problem is that I need to set cookies for several domains. What's up with it? I don't seem to be missing anything.
×
×
  • 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.