<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WEB-NES-BAY &#187; Scripts</title>
	<atom:link href="http://webnesbay.com/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://webnesbay.com</link>
	<description>Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware</description>
	<lastBuildDate>Sun, 11 Apr 2010 05:12:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating thumbnails in PHP using pear libraries</title>
		<link>http://webnesbay.com/creating-thumbnails-in-php-using-pear-libraries/</link>
		<comments>http://webnesbay.com/creating-thumbnails-in-php-using-pear-libraries/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 06:08:33 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Creating Thumbnails]]></category>
		<category><![CDATA[Data Input]]></category>
		<category><![CDATA[Gd Library]]></category>
		<category><![CDATA[Gd Module]]></category>
		<category><![CDATA[Image Upload]]></category>
		<category><![CDATA[Input File]]></category>
		<category><![CDATA[Input Name]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Multipart Form Data]]></category>
		<category><![CDATA[Pear]]></category>
		<category><![CDATA[Php Gd]]></category>
		<category><![CDATA[Php Image]]></category>
		<category><![CDATA[Php Upload]]></category>
		<category><![CDATA[Right Foot]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Thumbnail]]></category>
		<category><![CDATA[Upload Image]]></category>
		<category><![CDATA[Upload Images]]></category>
		<category><![CDATA[Upload Php]]></category>
		<category><![CDATA[Uploaded]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=696</guid>
		<description><![CDATA[Well, for this task there are many ways of realizing it, many scripts and libraries that they can do, and this is another way in which this can be accomplished in a simple manner and without disheveled, for this I am taking 2 classes of PEAR are HTTP_Upload and the other is Image_Transform basically this is what we need to go and make our thumbnail in a simple manner as discussed below.
For this also I forgot we have to be [...]


Related posts:<ol><li><a href='http://webnesbay.com/creating-graphs-and-charts-in-php/' rel='bookmark' title='Permanent Link: Creating graphs and charts in PHP'>Creating graphs and charts in PHP</a></li>
<li><a href='http://webnesbay.com/creating-im-bot-using-php/' rel='bookmark' title='Permanent Link: Creating IM Bot using PHP'>Creating IM Bot using PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()">Well, for this task there are many ways of realizing it, many scripts and libraries that they can do, and this is another way in which this can be accomplished in a simple manner and without disheveled, for this I am taking 2 classes of PEAR are HTTP_Upload and the other is Image_Transform basically this is what we need to go and make our thumbnail in a simple manner as discussed below.</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()">For this also I forgot we have to be installed for php gd module is php_gd if we utilzar the GD library to do this (in my case that is what we use, but as the summer we also can use other libraries not necessarily this one).</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()">Good start making a small form to upload your file, I will not do all the HTML will emphasize only the points needed, which may be obvious but sometimes those little details that you overlook one, or there days when you really not rise with the right foot (could also be because left-handed: p) and that day no one comes out, so for that you can always check the website for tips you can save the day: D.</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()">The only detail to take care is that the form must have the property <strong>enctype = &#8220;multipart / form-data&#8221;</strong> and also our input file <strong>type</strong> should be type <strong>= &#8220;file&#8221;</strong> as we shall see in this small example,</span><br />
<code><br />
form action="subir.php" method="post" enctype="multipart/form-data"<br />
input name="userimage" type="file"<br />
/form<br />
</code></p>
<p>Sorry for not mentioning the entire code with opening and closing tags. <span onmouseover="_tipon(this)" onmouseout="_tipoff()">continuing the theme because we have our simple form let&#8217;s look at the side of php.<span style="direction: ltr; text-align: left;"> </span> only 2 classes need to include the above and are ready.</span><br />
<code><br />
require_once "HTTP/Upload.php";<br />
require_once "Image/Transform.php";</code></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">/* UPLOAD IMAGES */</span> </span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"> / * Do the Images Upload * /</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">$upload = new HTTP_Upload(”en”); </span>/ / Here we create our object so that it can climb and get as parameter the language in which we want to return errors.</span> <span onmouseover="_tipon(this)" onmouseout="_tipoff()">/ / I will put it in english</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">$image = $upload-&gt;getFiles(”userimage”); </span> / / here we get the filesystems uploaded in this case as our input is called that name userimage place and ready.</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"> $ ImageObject = &amp; Image_Transform:: factory ( &#8216;GD&#8217;), / / also create our object to manipulate the image once this up, as he had said prior to this utilizare GD</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()">$ image_directory = &#8220;. / images /&#8221;; / / to this directory to upload the image.</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()">if ($ image-&gt; isValid ()) / / here check if the object userimage received information is valid and has</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">{</span> (</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"> $ moved = $ image-&gt; moveTo ($ image_directory. &#8220;/ tmp&#8221;); / / here this function upload the file to the server and moves it to the directory that tells</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">if (PEAR::isError($moved))</span> </span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">{</span> (</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"> / / &#8220;ERROR up the image&#8221; could check if Subri, if I throw a PEAR ERROR.</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()">print_r ($ moved);</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">}else{</span> ) else (</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"> / * We get here the image is in the Server and we can start manipulating</span><span onmouseover="_tipon(this)" onmouseout="_tipoff()">* /</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">$userimages = $image-&gt;getProp(); </span> / / this meted siver us to get all the properties of the image, image type as that is, your name, extension and others.</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">$result = $imageObject-&gt;load($image_directory.”/tmp”.$userimages['name']); </span> / / so the burden with the name that had been placed</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">if (PEAR::isError($result))</span> </span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">{</span> (</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">echo “ERROR THUMBNAIL”; </span></span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">}else{</span> ) else (</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">$imageObject-&gt;resize(125,125); </span> / / If not, it overrides what is the size you want for it rezisee (my nice word)</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">$imageObject-&gt;save($image_directory.$_POST['maindata']['idlisting'].”.gif”,”gif”,100);</span> / / and recorded it again, once here take the opportunity to make</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()">/ / A gif image that we do know is the 3rd parameter can be converted to jpg, png, etc &#8230;</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"> / / And the last parameter tells the quality we want in the image, these last 2 parameters are optional and are not</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">necesarios</span> necessary</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">/* END Thumbnail */</span> / * END * Thumbnail /</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">}</span> )</span><span onmouseover="_tipon(this)" onmouseout="_tipoff()"></span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">}</span> )</span><br />
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span style="direction: ltr; text-align: left;">}</span> )</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"> / * END UPLOAD IMAGES * /</span></p>
<p><span onmouseover="_tipon(this)" onmouseout="_tipoff()"> So that was it really update this post later so they can go down as a class that implements this and an example Pequeni so they can download and I hope it serves them, anything to take your questions here, and I will answer the soon as possible. In order to manipulate the image must first be uploaded to the server may not otherwise do nothing.<br />
</span></p>


<p>Related posts:<ol><li><a href='http://webnesbay.com/creating-graphs-and-charts-in-php/' rel='bookmark' title='Permanent Link: Creating graphs and charts in PHP'>Creating graphs and charts in PHP</a></li>
<li><a href='http://webnesbay.com/creating-im-bot-using-php/' rel='bookmark' title='Permanent Link: Creating IM Bot using PHP'>Creating IM Bot using PHP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/creating-thumbnails-in-php-using-pear-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control Apache with the apachectl command</title>
		<link>http://webnesbay.com/control-apache-with-the-apachectl-command/</link>
		<comments>http://webnesbay.com/control-apache-with-the-apachectl-command/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 07:20:57 +0000</pubDate>
		<dc:creator>WEBNESBAY</dc:creator>
				<category><![CDATA[Internet tools]]></category>
		<category><![CDATA[Apache Configuration]]></category>
		<category><![CDATA[Apache Httpd]]></category>
		<category><![CDATA[Apache Server]]></category>
		<category><![CDATA[Apache Web Server]]></category>
		<category><![CDATA[Companion]]></category>
		<category><![CDATA[Configuration Changes]]></category>
		<category><![CDATA[Configuration File]]></category>
		<category><![CDATA[Configuration Files]]></category>
		<category><![CDATA[Conjunction]]></category>
		<category><![CDATA[Convenience]]></category>
		<category><![CDATA[Default Files]]></category>
		<category><![CDATA[Distributions]]></category>
		<category><![CDATA[Guesswork]]></category>
		<category><![CDATA[Interesting Things]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[People]]></category>
		<category><![CDATA[Production Configuration]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Syntax Check]]></category>
		<category><![CDATA[Web Server Software]]></category>

		<guid isPermaLink="false">http://webnesbay.com/?p=259</guid>
		<description><![CDATA[The Apache web server is arguably the best and most powerful web server software available for any operating system.
While many learn to edit the configuration files and configure or enable various modules, the bulk of what most people do with Apache is manage the content that Apache serves, with very little attention paid to what Apache itself can do.
Distributions provide initialisation scripts for Apache that take the guesswork out of using it. For instance, service httpd start would start the [...]


Related posts:<ol><li><a href='http://webnesbay.com/harder-apache-web-server-security/' rel='bookmark' title='Permanent Link: Harder Apache Web Server Security'>Harder Apache Web Server Security</a></li>
<li><a href='http://webnesbay.com/install-apache-2-2-on-windows/' rel='bookmark' title='Permanent Link: Install Apache 2.2 on windows'>Install Apache 2.2 on windows</a></li>
<li><a href='http://webnesbay.com/run-gentoo-apache2-php/' rel='bookmark' title='Permanent Link: Run Gentoo + Apache2 + PHP'>Run Gentoo + Apache2 + PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The Apache web server is arguably the best and most powerful web server software available for any operating system.</p>
<p>While many learn to edit the configuration files and configure or enable various modules, the bulk of what most people do with Apache is manage the content that Apache serves, with very little attention paid to what Apache itself can do.</p>
<p>Distributions provide initialisation scripts for Apache that take the guesswork out of using it. For instance, <em>service httpd start</em> would start the server and an associated <em>stop</em> command would bring it down. These initscripts, while a convenience, largely mask the power of the command they are calling, namely <em>apachectl</em>.</p>
<p>The apachectl command is a rather overlooked program when it comes to working with Apache; however, it can be used to do some very interesting things. For instance, you can debug or test configurations by starting Apache with an alternative configuration file, leaving the working/production configuration untouched until changes can be tested. This can be accomplished with the <em>-f</em> option and the specification of an alternate configuration file:</p>
<p><code># apachectl -f /etc/httpd/conf/httpd-testing.conf</code></p>
<p>This will start an Apache (httpd) process using the <em>httpd-testing.conf</em> file as the primary configuration file rather than the production <em>httpd.conf</em>.</p>
<p>A companion option here would be the <em>-t</em> option which performs a syntax check on configuration files, validating any changes you make. The command will warn if it detects any problems with the configuration file. Use it in conjunction with the <em>-f</em> option to validate in-progress configuration changes on non-default files: <em>apachectl -t -f /etc/httpd/conf/httpd-testing.conf</em>.</p>
<p>Another useful set of options are those that allow you to examine configuration content without actually opening and scanning configuration files. The <em>apachectl -M</em> command will list all loaded modules, those compiled-in and those that are shared. <em>apachectl -l</em> will display only those static modules that Apache loads; these would be the modules compiled into the httpd binary.</p>
<p>The <em>apachectl -L</em> option displays all available directives that Apache understands, and which module they are associated with. This is a great way to find out what options come from which module, and what they do. For instance:</p>
<p><code># apachectl -L</code></p>
<p><code>&lt;Directory (core.c)</code></p>
<p><code> Container for directives affecting resources located in the specified directories</code></p>
<p><code> Allowed in *.conf only outside &lt;Directory&gt;, &lt;Files&gt; or &lt;Location&gt;</code></p>
<p><code>...</code></p>
<p>The apachectl command also allows you to override directives on the command-line by using the <em>-c</em> option. This can be useful to temporarily test a new site or code. For instance, to override the default ServerLimit directive, use:</p>
<p><code># apachectl start -c "ServerLimit 1024"</code></p>
<p>Other useful directives to override include DocumentRoot and Listen, among others.</p>


<p>Related posts:<ol><li><a href='http://webnesbay.com/harder-apache-web-server-security/' rel='bookmark' title='Permanent Link: Harder Apache Web Server Security'>Harder Apache Web Server Security</a></li>
<li><a href='http://webnesbay.com/install-apache-2-2-on-windows/' rel='bookmark' title='Permanent Link: Install Apache 2.2 on windows'>Install Apache 2.2 on windows</a></li>
<li><a href='http://webnesbay.com/run-gentoo-apache2-php/' rel='bookmark' title='Permanent Link: Run Gentoo + Apache2 + PHP'>Run Gentoo + Apache2 + PHP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://webnesbay.com/control-apache-with-the-apachectl-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
