<?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>php script | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/php-script/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 05:31:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>How to resize image using php?</title>
		<link>https://studentprojects.in/software-development/php-mysql/php-tutorial/resize-image-php/</link>
					<comments>https://studentprojects.in/software-development/php-mysql/php-tutorial/resize-image-php/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 10:10:34 +0000</pubDate>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php script]]></category>
		<category><![CDATA[image resize]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1805</guid>

					<description><![CDATA[<p>Here is a simple script to resize the given image. This requires PHP5, GD library. First download the file and include to your code. Usage example:</p>
<p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/resize-image-php/">How to resize image using php?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Here is a simple script to resize the given image. This requires PHP5, GD library. </p>
<p>First <a href="https://studentprojects.in/wp-content/uploads/2011/09/resize-class.zip">download the file</a> and include to your code. </p>
<p><strong>Usage example:</strong></p>
<pre lang="php" escaped="true" line="1">
<?php
// *** Include the class
include("resize-class.php");

// *** 1) Initialise / load image
$resizeObj = new resize('sample.jpg');

// *** 2) Resize image (options: exact, portrait, landscape, auto, crop)
$resizeObj -> resizeImage(200, 200, 'crop');
// *** 3) Save image
$resizeObj -> saveImage('sample-resized.jpg', 100);
?>
</pre><p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/resize-image-php/">How to resize image using php?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/php-mysql/php-tutorial/resize-image-php/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to convert Digits or numbers to word using PHP?</title>
		<link>https://studentprojects.in/software-development/php-mysql/php-tutorial/convert-digits-word-php/</link>
					<comments>https://studentprojects.in/software-development/php-mysql/php-tutorial/convert-digits-word-php/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 01 Sep 2011 04:59:59 +0000</pubDate>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php script]]></category>
		<category><![CDATA[digit word]]></category>
		<category><![CDATA[number to text]]></category>
		<category><![CDATA[convert to text]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1788</guid>

					<description><![CDATA[<p>Here is the code to convert digits to word using PHP Example: 564 : five hundred sixty four</p>
<p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/convert-digits-word-php/">How to convert Digits or numbers to word using PHP?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Here is the code to convert digits to word using PHP</p>
<p><strong>Example:</strong></p>
<p>564 :  five hundred sixty four</p>
<pre lang="php" escaped="true" line="1">
<?php
$ones = array(
 "",
 " one",
 " two",
 " three",
 " four",
 " five",
 " six",
 " seven",
 " eight",
 " nine",
 " ten",
 " eleven",
 " twelve",
 " thirteen",
 " fourteen",
 " fifteen",
 " sixteen",
 " seventeen",
 " eighteen",
 " nineteen"
);

$tens = array(
 "",
 "",
 " twenty",
 " thirty",
 " forty",
 " fifty",
 " sixty",
 " seventy",
 " eighty",
 " ninety"
);

$triplets = array(
 "",
 " thousand",
 " million",
 " billion",
 " trillion",
 " quadrillion",
 " quintillion",
 " sextillion",
 " septillion",
 " octillion",
 " nonillion"
);

 // recursive fn, converts three digits per pass
function convertTri($num, $tri) {
  global $ones, $tens, $triplets;

  // chunk the number, ...rxyy
  $r = (int) ($num / 1000);
  $x = ($num / 100) % 10;
  $y = $num % 100;

  // init the output string
  $str = "";

  // do hundreds
  if ($x > 0)
   $str = $ones[$x] . " hundred";

  // do ones and tens
  if ($y < 20)
   $str .= $ones[$y];
  else
   $str .= $tens[(int) ($y / 10)] . $ones[$y % 10];

  // add triplet modifier only if there
  // is some output to be modified...
  if ($str != "")
   $str .= $triplets[$tri];

  // continue recursing?
  if ($r > 0)
   return convertTri($r, $tri+1).$str;
  else
   return $str;
 }

// returns the number as an anglicized string
function convertNum($num) {
 $num = (int) $num;    // make sure it's an integer

 if ($num < 0)
  return "negative".convertTri(-$num, 0);

 if ($num == 0)
  return "zero";

 return convertTri($num, 0);
}

 // Returns an integer in -10^9 .. 10^9
 // with log distribution
 function makeLogRand() {
  $sign = mt_rand(0,1)*2 - 1;
  $val = randThousand() * 1000000
   + randThousand() * 1000
   + randThousand();
  $scale = mt_rand(-9,0);

  return $sign * (int) ($val * pow(10.0, $scale));
 }

// example of usage
echo "564 : ".convertNum(564)."<br>";
echo "892 : ".convertNum(892);
?>
</pre>
<p>Output:</p>
<pre lang="html" escaped="true" line="1">
564 : five hundred sixty four
892 : eight hundred ninety two 
</pre><p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/convert-digits-word-php/">How to convert Digits or numbers to word using PHP?</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/php-mysql/php-tutorial/convert-digits-word-php/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>How to get image source from file using PHP</title>
		<link>https://studentprojects.in/software-development/php-mysql/php-tutorial/image-source-file-php/</link>
					<comments>https://studentprojects.in/software-development/php-mysql/php-tutorial/image-source-file-php/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Wed, 31 Aug 2011 17:46:31 +0000</pubDate>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[get image source]]></category>
		<category><![CDATA[php script]]></category>
		<category><![CDATA[get img src]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1782</guid>

					<description><![CDATA[<p>Use preg_match_all to get the image source from your file. PHP code: In the above code variable $content will have the complete source code. Searching the first image using preg_match_all Output: http:studentprojects.in/favicon.ico</p>
<p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/image-source-file-php/">How to get image source from file using PHP</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Use preg_match_all to get the image source from your file.</p>
<p><strong>PHP code:</strong></p>
<pre lang="php" escaped="true" line="1">
<?php 
	$content='Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
        Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, 
        when an unknown printer took a galley of type and scrambled it to make a type specimen book.
        <a href="/"><img decoding="async" alt="" id="logo" src="http:studentprojects.in/favicon.ico"></a>';
        $frst_image = preg_match_all( '|<img.*?src=[\'"](.*?)[\'"].*?>|i', $content, $matches );
	echo $item['image'] = $matches[ 1 ][ 0 ];
?>
</pre>
<p>In the above code variable $content will have the complete source code. Searching the first image using preg_match_all </p>
<p><strong>Output:</strong></p>
<pre lang="html" escaped="true" line="1">
http:studentprojects.in/favicon.ico
</pre><p>The post <a href="https://studentprojects.in/software-development/php-mysql/php-tutorial/image-source-file-php/">How to get image source from file using PHP</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/php-mysql/php-tutorial/image-source-file-php/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
