Jump to content

dreamwest

Members
  • Posts

    1,223
  • Joined

  • Last visited

    Never

Everything posted by dreamwest

  1. Please, don't suggest using the @ operator in a help thread. Always use it in a live application
  2. $data = @file_get_contents("XML URL"); $n_data = new SimpleXmlElement($data, LIBXML_NOCDATA); foreach ($n_data->actor as $d) { $show[] = $d; } echo implode(", ", $show);
  3. or you can use shell_exec() if you still want to use php <?php if(shell_exec("mysqldump --opt -u user -p dbname > {path}/backup.sql")){ echo "Backed up!"; }else{ echo "Failed"; } ?>
  4. Most likely from gzipped pages returning partial content
  5. http://www.wizecho.com/nav=php&s=php_mysql_backup
  6. Use CDATA with characters in strings http://www.wizecho.com/nav=php&s=xml
  7. Do not patronize me, smart ass. I'm sure your know very little about what I am even referring to. Thats the way i talk i call everyone darling
  8. JavaScript is nothing like PHP. Syntax wise, maybe a little, but that is about where the similarities end. It has a completely different inheritance model based on prototypes. Yes darling similar - not identical Javascript function test(txt){ if(txt){ alert("Txt is valid"); }else{ alert("no txt"); } }//end test Php function test($txt){ if($txt){ echo "Txt is valid"; }else{ echo "no txt"; } }//end test
  9. Javascript is very similar to php so why not learn it. I use javascript like crazy in my tax tracker program i built, i can do my tax in 1 hour when before it took 2 weeks
  10. Thanks DW. 1) Will it effect my SEO with Googlebots negatively, as i am restricting them to crawl slow? 2) Do i need to register to Webmaster tool for this to work? (Because i do not want to register my site with Google Webmaster) Cheers N Just throw it in robots.txt and your done
  11. User-agent: googlebot Request-rate: 1/10 # maximum rate is one page every 10 seconds.
  12. When i changed my urls to seo i had a dramatic increase in traffic after 2 months, copy wikipedias technique
  13. Change the action to the page you want to post to action="/page.php"
  14. and also put this at the top of your HTML page <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. http://www.wizecho.com/nav=php&s=forms
  16. Best fight ive seen. Still cant find the full version where the mild mannered guy tears his shirt off to release the hulk http://www.youtube.com/watch?v=o_-E0WhkJcI&feature=related
  17. XMLs are just like arrays, you point to the keys you want $data = @file_get_contents("wiz.xml"); $n_data = new SimpleXmlElement($data, LIBXML_NOCDATA); foreach ($n_data->xml->entry as $d) { $show .= "Userid: {$d->target_user->user_id} Mob: {$d->target_user->mob_name} Paid user: {$d->paid_user->user_id}<br>"; } echo $show;
  18. http://www.wizecho.com/nav=extra&s=bits#3
  19. Your XML probably has CDATA in it http://www.wizecho.com/nav=php&s=xml
  20. simple_img.class.php <?php class SimpleImage { var $image; var $image_type; function load($filename) { $image_info = getimagesize($filename); $this->image_type = $image_info[2]; if( $this->image_type == IMAGETYPE_JPEG ) { $this->image = imagecreatefromjpeg($filename); } elseif( $this->image_type == IMAGETYPE_GIF ) { $this->image = imagecreatefromgif($filename); } elseif( $this->image_type == IMAGETYPE_PNG ) { $this->image = imagecreatefrompng($filename); } } function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image,$filename,$compression); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image,$filename); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image,$filename); } if( $permissions != null) { chmod($filename,$permissions); } } function output($image_type=IMAGETYPE_JPEG) { if( $image_type == IMAGETYPE_JPEG ) { imagejpeg($this->image); } elseif( $image_type == IMAGETYPE_GIF ) { imagegif($this->image); } elseif( $image_type == IMAGETYPE_PNG ) { imagepng($this->image); } } function getWidth() { return imagesx($this->image); } function getHeight() { return imagesy($this->image); } function resizeToHeight($height) { $ratio = $height / $this->getHeight(); $width = $this->getWidth() * $ratio; $this->resize($width,$height); } function resizeToWidth($width) { $ratio = $width / $this->getWidth(); $height = $this->getheight() * $ratio; $this->resize($width,$height); } function scale($scale) { $width = $this->getWidth() * $scale/100; $height = $this->getheight() * $scale/100; $this->resize($width,$height); } function resize($width,$height) { $new_image = imagecreatetruecolor($width, $height); imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight()); imagefilter($new_image, IMG_FILTER_CONTRAST, -10); $this->image = $new_image; } } ?> include('simple_img.class.php'); $image = new SimpleImage(); $image->load("img.png"); $image->resize(100,100); $image->save("img2.png");
×
×
  • 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.