dreamwest
Members-
Posts
1,223 -
Joined
-
Last visited
Never
Everything posted by dreamwest
-
Please, don't suggest using the @ operator in a help thread. Always use it in a live application
-
$data = @file_get_contents("XML URL"); $n_data = new SimpleXmlElement($data, LIBXML_NOCDATA); foreach ($n_data->actor as $d) { $show[] = $d; } echo implode(", ", $show);
-
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"; } ?>
-
Most likely from gzipped pages returning partial content
-
http://www.wizecho.com/nav=php&s=php_mysql_backup
-
Why should you learn javascript when you know php?
dreamwest replied to Bentley4's topic in Miscellaneous
It made you love me more -
Why should you learn javascript when you know php?
dreamwest replied to Bentley4's topic in Miscellaneous
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 -
Why should you learn javascript when you know php?
dreamwest replied to Bentley4's topic in Miscellaneous
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 -
Why should you learn javascript when you know php?
dreamwest replied to Bentley4's topic in Miscellaneous
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 -
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
-
User-agent: googlebot Request-rate: 1/10 # maximum rate is one page every 10 seconds.
-
PHP coding: Mod Rewrite and Search Engine Ranking
dreamwest replied to Matt B's topic in Miscellaneous
When i changed my urls to seo i had a dramatic increase in traffic after 2 months, copy wikipedias technique -
print_r($prices);
-
Error comparing a line from a file with a string
dreamwest replied to pantinosm's topic in PHP Coding Help
http://www.wizecho.com/nav=php&s=files -
Change the action to the page you want to post to action="/page.php"
-
and also put this at the top of your HTML page <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
http://www.wizecho.com/nav=php&s=forms
-
Change collation to utf8_bin
-
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
-
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;
-
http://www.wizecho.com/nav=extra&s=bits#3
-
TCPDF
-
Your XML probably has CDATA in it http://www.wizecho.com/nav=php&s=xml
-
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");