CS174
Chris Pollett
Apr 20, 2016
http://www.yioop.com/s/news?f=rss&limit=20&num=30
url/method1?arg_1_for_method1=value_1& arg_2_for_method1=value_2... url/method2?arg_1_for_method2=value_1& arg_2_for_method2=value_2... ...
12.3 -- an example Number "hi there" -- an example String true -- an example Boolean, other possibility false
[1, 4, 9]
{"bob": 29, "sally" : 35}
myObj = eval( "(" + data + ")" );
http://developer.yahoo.com/javascript/samples/proxy/php_proxy_simple.txt
http://yourServer/proxy.php?yws_path=urlencodepath
http://somewhere.com/proxy.php?yws_path= NewsSearchService%2FV1%2FnewsSearch%3Fappid%3DYahooDemo%26 query%3Dmadonna%26results%3D2%26language%3Den
<form enctype="multipart/form-data" method="post" action="test_upload1.php" > <input type="hidden" name="MAX_FILE_SIZE" value="1000000" /> <!-- The size is also controlled by php.ini --> <input type="file" name="docname" /> <input type="submit" value="Upload" /> </form>
Array( [name] => mystyles.css [type] => text/css [tmp_name] => /private/var/folders/k-/k-GHnyslGhyOhMqq80ZXgk+++TI/-Tmp-/phpcSLlhk [error] => 0 [size] => 157)Hence, we can then do a command like:
move_uploaded_file($_FILES["docname"]["tmp_name"], "$where_we_want");to get the file where we would like.
Please type the following text:
<p><b>Please type in the following text:</b> <?php $md5 = md5(microtime() * mktime()); $captcha_string = substr($md5,0,5); $captcha_img = imagecreatetruecolor(70, 40); $color = imagecolorallocate($captcha_img, 255, 0, 255); $line = imagecolorallocate($captcha_img,233,239,239); imagestring($captcha_img, 5, 10, 10, $captcha_string, $color); imageline($captcha_img,0,0,39,29,$line); imageline($captcha_img,40,0,64,29,$line); imageline($captcha_img,0,40,64,0,$line); imagejpeg($captcha_img, "images/captcha.jpg",100); imagedestroy($captcha_img); $_SESSION['key'] = md5($captcha_string); ?> <img src="images/captcha.jpg" alt="captcha" style="position:relative; top:15px;"/> <input type="text" name="key" size="5" /></p>
function createThumb($image, $base, $filename) { $image = imagecreatefromjpeg($base.$filename); //or could have imagecreatefromgif, etc $size = getimagesize($base.$filename); $thumb = imagecreatetruecolor(50, 50); imagecopyresampled($thumb, $image, 0,0, 0,0, 50, 50, $size[0],$size[1]); imagejpeg( $thumb, $base."thumb.jpg", 100 ); imagedestroy($image); imagedestroy($thumb); }
$message = "Here is a mail message"; mail("Someone@somewhere.com", "Here is the title", $message, "From: cpollett@somewhereelse.com");