Jump to content

dsartain

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dsartain's Achievements

Member

Member (2/5)

0

Reputation

  1. No, it's testing the same field for either values "" (NULL) or " " (space)...so or should be the right word...
  2. Hey guys, I'm having some trouble with this if statement. I'm writing a text file (yes, has to be a text file) and some items have three keywords, some have between 4 and 7. I've written this if statement to filter out where keywords 4-7 are blank, but so far it's not working. Both below if statements still print the keywords 4-7 even when there isn't a word there. if(stripslashes($row['keyword4'])!=NULL or stripslashes($row['keyword4']) !=" ") { $stringData2 = "".stripslashes($row['network'])."2, ".stripslashes($row['advertiser']).", ".stripslashes($row['keyword4']).", ".stripslashes($AdURL).", 0.20, Active\n"; fwrite($fh2, $stringData2); } if(stripslashes($row['keyword4'])!="" or stripslashes($row['keyword4']) !=" ") { $stringData2 = "".stripslashes($row['network'])."2, ".stripslashes($row['advertiser']).", ".stripslashes($row['keyword4']).", ".stripslashes($AdURL).", 0.20, Active\n"; fwrite($fh2, $stringData2); } I have also tried the above with single quotes instead of double. When I run SELECT * FROM ad_links3.link_table l WHERE keyword4=" "; on the DB, I get results. So this if statement should eliminate those if the mysql is responding to " " for keyword4, but it's not... This is what this code produces when run through a loop, lines 4-7 should not be there as there is no keyword... CB2, Google.com, Google.com, http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active CB2, Google.com, Google com, http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active CB2, Google.com, Googlecom, http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active CB2, Google.com, , http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active CB2, Google.com, , http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active CB2, Google.com, , http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active CB2, Google.com, , http://www.adclicktracking.com/CB/Google.html?keyword={keyword}G, 0.20, Active Any ideas??
  3. Make sure you've created a new path for PHPRC in the environment variables...look at the first couple of postings and you should see the value of PHPRC.
  4. Hey guys, I'm trying to get PHP 5 and IIS 7 to talk to each other...but I can't find any documentation on how to get this to work...can someone shed some light on this for me?? Thanks.
  5. Hey guys, I'm working on a project in which I need to compare two text files for similarities. Kind of like an email content filter would do, but dumbed way down. I know there is a PEAR text_diff package that looks for differences, but I need something like that package that looks for similarities...ideas??? Alternatively, can I use the php string function to loop through both files and search for the similarities?? Thanks.
  6. I'm working on a website for my family and they want to be able to use paypal to process transactions, but still want the ability to go in and update the shopping cart with new prices and such...Paypal's business account only lets me set the values when I create the buttons, and that's annoying as hell to change... Does anyone know how to pass values to paypal so that when they click the paypal "buy" button that it updates the information automatically???? Thanks!
  7. Which user actually runs PHP scripts in IIS?? For some reason I'm not being able to write to C:\inetpub\wwwroot...I've disabled simple file sharing, but can't figure out which user needs to have write access to the folders????
  8. whoops!!! I forgot one minor thing.... function thumbnail($image_path,$thumb_path,$image_name,$thumb_width) { $src_img = imagecreatefromjpeg("$image_path/$image_name"); $origw=imagesx($src_img); $origh=imagesy($src_img); $new_w = $thumb_width; $new_h=($origh*($new_w))/$origw; //added to get better proportions $diff=$origw/$new_w; $dst_img = imagecreatetruecolor($new_w,$new_h); //I left this line out...doh!! imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img)); imagejpeg($dst_img, "$thumb_path/$image_name", 100); return true; } Thanks a lot for the help!!!
  9. function thumbnail($image_path,$thumb_path,$image_name,$thumb_width) { $src_img = imagecreatefromjpeg("$image_path/$image_name"); $origw=imagesx($src_img); $origh=imagesy($src_img); $new_w = $thumb_width; $new_h=($origh*($new_w))/$origw; //added to get better proportions $diff=$origw/$new_w; //$new_h=$new_w; //removed to get better proportions $dst_img = imagecreate($new_w,$new_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img)); //just added 100 for $quality...no change in display though imagejpeg($dst_img, "$thumb_path/$image_name", 100); return true; }
  10. well, this seems to work as far as the resizing goes when it comes to the JPEG format...but worthless if the image quality keeps being reduced...any other ideas??
  11. Nope, same thing happened....see above link...
  12. One other thing...the actual mime type is "image/pjpeg"...I don't know if that makes a difference...and this fuction won't handle .gif or .png...though it would be amazing if I could get it to do that...
  13. Go to http://www.the24hourshow.net/dsartain/gallery.php The two images with "Blue Wall" Captions and the one with "Swimming Lessons"...all are towards the bottom...images as colors should appear are on that page also (though I didn't use GD2 for those...)
  14. I've got a function that I'm using to make thumbnails out of images....but the problem is that it's fading the images....I can't figure out why though....please help!! // actual function function thumbnail($image_path,$thumb_path,$image_name,$thumb_width) { $src_img = imagecreatefromjpeg("$image_path/$image_name"); $origw=imagesx($src_img); $origh=imagesy($src_img); $new_w = $thumb_width; $new_h=($origh*($new_w))/$origw; //added to get better proportions $diff=$origw/$new_w; //$new_h=$new_w; //removed to get better proportions $dst_img = imagecreate($new_w,$new_h); imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img)); imagejpeg($dst_img, "$thumb_path/$image_name"); return true; } //usage thumbnail("/var/www/html/dsartain/images/gallery/", "/var/www/html/dsartain/images/gallery/thumbnails/", $userfile_l_name, 150) ;
×
×
  • 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.