{"id":1465,"date":"2018-01-19T19:22:52","date_gmt":"2018-01-19T19:22:52","guid":{"rendered":"http:\/\/goofy-trucks.flywheelsites.com\/getting-started-with-php-ming-page-3\/"},"modified":"2018-01-19T19:24:48","modified_gmt":"2018-01-19T19:24:48","slug":"getting-started-with-php-ming-page-3","status":"publish","type":"post","link":"https:\/\/phpbuilder.com\/getting-started-with-php-ming-page-3\/","title":{"rendered":"Getting Started with PHP\/Ming Page 3"},"content":{"rendered":"<div class=\"phpbuilder-content\">\n<div class=\"phpbuilder-meta\">\n<div class=\"\">By Iman S. H. Suyoto<\/div>\n<div class=\"\">on August 10, 2001<\/div>\n<\/p><\/div>\n<div id=\"overflow-content\">\n<div class=\"articlePara\">\nAfter the adjustments, I could <code class=\"example\">make<\/code> and<br \/>\n<code class=\"example\">make install<\/code> successfully. As the message<br \/>\n<code class=\"example\">make install<\/code> says, we should not forget to add<br \/>\n<code class=\"example\">extension=php_ming.so<\/code> to <var>php.ini<\/var> (and<br \/>\nsomething not mentioned, restart our web server). I did those<br \/>\nthings and I could later use the code shown in the next<br \/>\nsection.<\/div>\n<div class=\"articlePara\">\nI don&#8217;t know whether we should do these tasks under other<br \/>\nDebian-based distros like Corel Linux or Storm Linux. I haven&#8217;t<br \/>\ntried (even I have never installed any of them). I would be<br \/>\nglad if someone can inform me about it.<\/div>\n<h2>Testing the Installation<\/h2>\n<div class=\"articlePara\">\nAfter we have successfully installed PHP\/Ming, we can try<br \/>\nthis code:<\/div>\n<div class=\"articlePhpEx\">\n<font face=\"courier\"><code><span style=\"color: #000000\"><\/p>\n<p><span style=\"color: #0000BB\">&lt;?php<br \/>\n<br \/><\/span><span style=\"color: #FF8000\">\/\/\u00a0create\u00a0movie\u00a0and\u00a0set\u00a0parameters<br \/>\n<br \/><\/span><span style=\"color: #0000BB\">$movie<\/span><span style=\"color: #007700\">=new\u00a0<\/span><span style=\"color: #0000BB\">SWFMovie<\/span><span style=\"color: #007700\">();<br \/>\n<br \/><\/span><span style=\"color: #0000BB\">$movie<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">setBackground<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">0xee<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">0xee<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">0xff<\/span><span style=\"color: #007700\">);\u00a0\u00a0<\/span><span style=\"color: #FF8000\">\/\/\u00a0nice\u00a0light\u00a0blue<br \/>\n<br \/><\/span><span style=\"color: #0000BB\">$movie<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">setDimension<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">800<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">600<\/span><span style=\"color: #007700\">);<br \/>\n<br \/><\/span><span style=\"color: #FF8000\">\/\/\u00a0draw\u00a0rectangles<br \/>\n<br \/><\/span><span style=\"color: #007700\">for(<\/span><span style=\"color: #0000BB\">$c<\/span><span style=\"color: #007700\">=<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<\/span><span style=\"color: #0000BB\">$c<\/span><span style=\"color: #007700\">&lt;<\/span><span style=\"color: #0000BB\">5<\/span><span style=\"color: #007700\">;<\/span><span style=\"color: #0000BB\">$c<\/span><span style=\"color: #007700\">++)<br \/>\n<br \/>{\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">=new\u00a0<\/span><span style=\"color: #0000BB\">SWFShape<\/span><span style=\"color: #007700\">();<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #FF8000\">\/\/\u00a0set\u00a0line\u00a0width\u00a020,\u00a0with\u00a0blue\u00a0shade<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">setLine<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">20<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">0x00<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">0x00<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">$c<\/span><span style=\"color: #007700\">*<\/span><span style=\"color: #0000BB\">50<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">=<\/span><span style=\"color: #0000BB\">$c<\/span><span style=\"color: #007700\">*<\/span><span style=\"color: #0000BB\">20<\/span><span style=\"color: #007700\">;<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">movePenTo<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">100<\/span><span style=\"color: #007700\">+<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">100<\/span><span style=\"color: #007700\">+<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">drawLineTo<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">700<\/span><span style=\"color: #007700\">-<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">100<\/span><span style=\"color: #007700\">+<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">drawLineTo<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">700<\/span><span style=\"color: #007700\">-<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">500<\/span><span style=\"color: #007700\">-<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">drawLineTo<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">100<\/span><span style=\"color: #007700\">+<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">500<\/span><span style=\"color: #007700\">-<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">drawLineTo<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">100<\/span><span style=\"color: #007700\">+<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">,<\/span><span style=\"color: #0000BB\">100<\/span><span style=\"color: #007700\">+<\/span><span style=\"color: #0000BB\">$offset<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #FF8000\">\/\/\u00a0add\u00a0to\u00a0canvas<br \/>\n<br \/>\u00a0\u00a0<\/span><span style=\"color: #0000BB\">$movie<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">add<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$shape<\/span><span style=\"color: #007700\">);<br \/>\n<br \/>\u00a0\u00a0}<br \/>\n<br \/><\/span><span style=\"color: #FF8000\">\/\/\u00a0send\u00a0output<br \/>\n<br \/><\/span><span style=\"color: #0000BB\">header<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">\"Content-Type:application\/x-shockwave-flash\"<\/span><span style=\"color: #007700\">);\u00a0<br \/>\n<br \/><\/span><span style=\"color: #0000BB\">$movie<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">output<\/span><span style=\"color: #007700\">();<br \/>\n<br \/><\/span><span style=\"color: #0000BB\">?&gt;<\/span><br \/>\n<\/span><br \/>\n<\/code><\/font><\/div>\n<div class=\"articlePara\">\nWe should be able see five rectangles with blue shades. If not,<br \/>\nthere may be something wrong with the installation.<\/div>\n<div class=\"articleHeader\">\nEnding Words<\/div>\n<div class=\"articlePara\">\nThe PHP binding for Ming relies heavily on the<br \/>\nobject-oriented feature of PHP. Please consult the<br \/>\ndocumentation for further information. This article has brought<br \/>\nyou to the start, so you can now move on with your own<br \/>\nmovies.<\/div>\n<div class=\"articlePara\">\nHappy coding!<\/div>\n<div class=\"articlePara\">\n<blockquote><p><i><br \/>\nWhen not playing the music, Iman S. H. Suyoto probably plays around with<br \/>\nsoftware development tools. He currently works as a trainer for web<br \/>\ndevelopment technologies in <a href=\"http:\/\/www.institute.co.id\/\" target=\"_blank\">World<br \/>\nWide Web Institute Indonesia<\/a>. He has published several articles in<br \/>\n<a href=\"http:\/\/www.mikrodata.co.id\/\" target=\"_blank\">MIKRODATA<\/a>, an Indonesian computer<br \/>\nand programming publication. In 1997, he started doing web development.<br \/>\nHe has been using PHP since 2000.<br \/>\n<\/i><\/p><\/blockquote>\n<\/div>\n<\/div>\n<p><\/p>\n<div style=\"float: left; padding:15px; color:#17AAF3\">\n<div style=\"float:left; padding:2px;\"><a class=\"paginationPageLink\" href=\"suyoto200108094658.html?page=2\">\u00ab Previous Page<\/a><\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"suyoto20010809.html\">1<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"float:left; padding:2px 4px 2px 4px;\"><a class=\"pageNumber\" href=\"suyoto200108094658.html?page=2\">2<\/a> <\/div>\n<div style=\"float:left; font-size:16px; color:#FF7A22; padding:2px 2px 2px 2px; \">| <\/div>\n<div style=\"background-color:#B6E5FC; font-size:16px; margin-top:1px; padding:1px 4px 1px 4px; color:#000; font-style:bold; float:left;\">3<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>One day, I found a site about Ming, a SWF output library and PHP module. Somehow, it attracted me, and gave me a driving force to try it immediately.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1465","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/comments?post=1465"}],"version-history":[{"count":1,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1465\/revisions"}],"predecessor-version":[{"id":3319,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/posts\/1465\/revisions\/3319"}],"wp:attachment":[{"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/media?parent=1465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/categories?post=1465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phpbuilder.com\/wp-json\/wp\/v2\/tags?post=1465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}