Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. This works well, I've used it in the past. https://blueimp.net/ajax/
  2. Well nobody can run your form or see the errors. Wherever you checked this for validation should show you what's wrong with it as well.
  3. You can always export then import them back in to eliminate any empty id's you had. If using auto_increment.
  4. The extensions if are there would not make a difference,not having them is just for looks. As long as you don't use url's like http://www.phpfreaks.com/forums/index.php?topic=332178.0 Use friendlier versions something like http://www.phpfreaks.com/forums/re-search-engine-url-choice or even http://www.phpfreaks.com/forums/index.php?topic=re-search-engine-url-choice Using urls with the multiple get queries isn't that bad, and sometimes is better. Using an example like this, the search engines can also pick up on the individual words for the GET's, which can help. http://mysite.com/index.php?category=music&genre=rock&artist=bon-jovi&album=slippery-when-wet&song=you-give-love-a-bad-name rather than a rewrite http://mysite.com/music/rock/bon-jovi/slippery-when-wet/you-give-love-a-bad-name Sure it looks all tidy, but lost some extra words that could have used. But in the end the most important thing would be that your rewrite rules don't break the links.
  5. My nephew said he would have ran if saw it, unfortunately I would now not have a home if that was the case. Firemen don't get there that fast, by that time the fire would be much larger and now be the house burning. I've seen it so many times........windows put out, doors knocked down, thousands of gallons of water blasted everywhere and usually for a few hours. Smoke and water damage alone can make it unlivable. Their priority is getting out the fire and save lives, not to keep your possessions in good shape. My mom a few years ago lost everything due to one of those little ceramic heaters. It had the built in safety, the dog knocked it over, the safety never tripped and caught the rug on fire. To me.....if you can stand there with your garden hose or drag said burning item out of your house and have a chance to put it out, then go for it. You have everything to lose. At least when the firemen do arrive they may not destroy everything and just do a good check that nothing is burning.
  6. Let's say from the first script you want it to be a hyperlink and pass that value to a second script. script1.php <?php $id = 35; echo "<a href='script2.php?id=$id'>Go to script2 with ID $id</a>"; ?> Or can do the hyperlink something like this way. <a href="script2.php?id=<?php echo $id;?>">Go to script2 with ID <?php echo $id;?></a> script2.php <?php $id = $_GET['id']; echo $id."<br />"; ?>
  7. Basically you would need to assign a variable with $_GET http://www.w3schools.com/php/php_get.asp Here's a phpfreaks post with some explanation and a demo example code. http://www.phpfreaks.com/forums/index.php?topic=331915.msg1562195#msg1562195
  8. My bad, now that I found the code, I see they use python scripts. http://browsershots.googlecode.com/svn/trunk/
  9. My clothes were scorched, and of course the dryer was shot. But nothing else in the house was damaged, I luckily caught the fire as soon as it happened. Besides the lint trap it's also good to clean out the underneath of the drum, you need to remove the back panel, you'll find fabric softener sheets and also more lint there, even money sometimes, never usually more than a dollar bill and loose change oddly.
  10. The site is pretty cool. I like how they have the similar looking sites, and also what colors they use. Since I take website snapshots.....I thought to myself wow that site is so amazing, how in the world did they make snapshots work for all the browsers and versions along with on different operating systems yet, must be one heck of a code. Then I saw this. These 58 computers are run by volunteers to make browser screenshots. So they have people with that browser loaded actually snapping them manually, quite a bit of work they got there. So that means you won't get instant results. I myself have a few different ways of taking them using bat files, command line in scripts, using IE or Firefox, various snapshot plugins used along with printscreen. I let gd do all my resizing. A friend of mine made one that works very well for linux and Xvfb using multiple firefox sessions. http://wimg.ca/ Back on subject..... https://browserlab.adobe.com/ integrated in dreamweaver cs4 Then this will view a lot of IE versions http://ipinfo.info/netrenderer/ And might as well show you this multiple browser screenshot tool as well http://www.browserseal.com/ I'm sure there are dozens more out there.
  11. Hmmm shouldn't you be inserting the value of whateverr url to be checked is? $the_url_to_check = "http://adifferentsite.com/"; if(is_base_domain($the_url_to_check) == TRUE){ // do function} Now whether you need to check for true or false that would depend upon what your do function is gonna do.
  12. Indeed, can clearly see the example works on it's own. So that leaves me to believe it's the way you are checking it.
  13. May have to switch it around, I have to true if is found
  14. I can't run that function. Try this instead <?php function is_base_domain($url) { //get the server name $base= $_SERVER['SERVER_NAME']; // match if(preg_match("/$base/i", $url)){ return TRUE; } else { return FALSE; } } $url= "http://somesite.com/script.php"; $check = is_base_domain($url); if($check == TRUE){ echo "same domain"; }else{ echo "different domain"; } ?>
  15. Upon posting I realize this was an older thread, but I will write the solution just for the record. On each of the computers do this. go to: C:\WINDOWS\system32\drivers\etc\hosts add lines similar to this: 192.168.1.45 site.com 192.168.1.45 *.site.com in my example 192.168.1.45 would be the servers computer ip, yours can be different ranges site.com is the domain name in the run bar you can type this command to see the servers computer ip ipconfig /all
  16. Is no meta data for description and keywords. http://www.w3schools.com/html/html_meta.asp
  17. The function is about as simple as can get as far as functions go. It surely works, do you have a snippet of code and how are trying to use this? If you post that here it would most likely help.
  18. Then use it this way. function checkSameDomain($url) { $domain = "mysite.com"; if (preg_match("/$domain/i", $url)) { return false; } else { return true; } }
  19. Ahh, I see what you meant now. $parse_url = $parsedUrl['host'] ? $parsedUrl['host'] : array_shift(explode('/', $parsedUrl['path'], 2));
  20. All I can say is it works. When is no value it doesn't output anything but www, if the exit is extra so be it. The mysql real escape is a habit because I usually do input into mysql, but it still does work exactly the way I have it. It's was just a demo anyway. The function is what the person needs. As for the parsing of url functions, it doesn't need any quotes and when you do it breaks. You can even look here and see not one of them are quoted when multiple parses are used. http://php.net/manual/en/function.parse-url.php I will forever place my functions up top so they can be accessed multiple times if needed without having to be defined first. If I was to include the function, that's where it would be. Feel free to make changes and then post your "fixed" version.
  21. The code was to give you ideas of how to go about achieving this with your code, not a drop in solution. Your values are different. You need to use your page number values, the total posts, amounts per page and href style links.
  22. I made a little demo with ranges of pages and groups of items. http://get.blogdns.com/dynaindex/page-range.php <?php $page = mysql_real_escape_string($_GET['page']); if (!isset($_GET['page']) or !is_numeric($_GET['page'])) { $page = 1; } $range = range(1,10); function pageRange($page_number,$page_amount=NULL){ if($page_amount == ""){ $page_amount = 10; } $page_high = $page_number *$page_amount; $page_low = $page_high -$page_amount +1; $page_range = "$page_low-$page_high"; return $page_range; } foreach($range as $page_number){ $page_range = pageRange($page_number,$page_amount); echo "<a href='page-range.php?page=$page_number'>$page_range</a> "; } echo "<br />"; echo "Now on page $page, viewing items ".pageRange($page)."<br />"; ?>
  23. Just wrote this up for you to make ranges of pages. <?php function pageRange($page_number,$page_amount){ if($page_amount == ""){ $page_amount = 10; } $page_high = $page_number *$page_amount; $page_low = $page_high -$page_amount +1; $page_range = "$page_low-$page_high"; return $page_range; } //usage $page_number = 1; $page_amount = 10; $page_range = pageRange($page_number,$page_amount); echo $page_range; ?>
  24. I'm thinking something like this is what you are after <?php $url = "http://www.mysite.com/folder/script.php"; function checkSameDomain($url) { $domain = "mysite.com"; if (preg_match("/$domain/i", $url)) { return true; } else { return false; } } //usage if(checkSameDomain($url) == true) { echo "same domain"; } else { echo "different domain"; } ?> I was a little foggy as to your exact question. Do you mean you need to check if some other site is using your domain in some sort of shortening url already? If that is the case then use curl and follow any redirects..then use the checkSameDomain function.
×
×
  • 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.