Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426
Code Snippets - The Scripts Library Community Free programming tutorial and source code for beginners and professional http://www.scriptslibrary.net/code-snippets 2010-09-09T07:22:21Z Joomla! 1.5 - Open Source Content Management Remove characters from a string except numbers and letters 2009-12-05T01:34:19Z 2009-12-05T01:34:19Z http://www.scriptslibrary.net/php/124-remove-characters-from-a-string-except-numbers-and-letters Feras ferasc@hotmail.com If you want to remove all characters and special symbols from a string in php, use the following code snippet:<br /><br /><br />{CODE brush: php;} <br />&lt;?php<br /><br />$string = "remove *unwanted !character% from my string 1212&&";<br />$clean_string= ereg_replace("[^A-Za-z0-9]", "", $string);<br />echo $clean_string<br /><br />?&gt;<br />{/CODE} If you want to remove all characters and special symbols from a string in php, use the following code snippet:<br /><br /><br />{CODE brush: php;} <br />&lt;?php<br /><br />$string = "remove *unwanted !character% from my string 1212&&";<br />$clean_string= ereg_replace("[^A-Za-z0-9]", "", $string);<br />echo $clean_string<br /><br />?&gt;<br />{/CODE} Get Local IP Address List Using VB.NET 2009-11-28T15:43:49Z 2009-11-28T15:43:49Z http://www.scriptslibrary.net/visual-basic-net/123-get-local-ip-address-list-using-vbnet Feras ferasc@hotmail.com Get local IP address list using VB.NET.<br /> Get local IP address list using VB.NET.<br /> Get Computer Name Using VB.NET 2009-11-27T16:47:14Z 2009-11-27T16:47:14Z http://www.scriptslibrary.net/visual-basic-net/122-get-computer-name-using-vbnet- Feras ferasc@hotmail.com Get a computer’s name by using the static method Dns.GetHostName in VB.NET<br /><br />Required namespace for this snippet:<br /> Get a computer’s name by using the static method Dns.GetHostName in VB.NET<br /><br />Required namespace for this snippet:<br /> Count Words in a Text String in VB.NET 2009-11-27T04:32:41Z 2009-11-27T04:32:41Z http://www.scriptslibrary.net/visual-basic-net/121-count-words-in-a-text-string-in-vbnet Feras ferasc@hotmail.com A simple function that count number of words in a given text string, assuming that it’s delimited by spaces:<br /> A simple function that count number of words in a given text string, assuming that it’s delimited by spaces:<br /> PHP Function to Prevent SQL injection 2009-11-27T03:06:22Z 2009-11-27T03:06:22Z http://www.scriptslibrary.net/php/120-php-function-to-prevent-sql-injection Feras ferasc@hotmail.com Function to clean user input string to prevent SQL injections: Function to clean user input string to prevent SQL injections: Play Movie Flash File using HTML 2009-11-27T02:49:24Z 2009-11-27T02:49:24Z http://www.scriptslibrary.net/html/119-play-movie-flash-file-using-html Feras ferasc@hotmail.com A simple code snippet demonstrates how to play a Flash Movie in Object Tag:<br /> A simple code snippet demonstrates how to play a Flash Movie in Object Tag:<br /> Socket Connect and Data Send in VB.NET 2009-07-24T23:49:13Z 2009-07-24T23:49:13Z http://www.scriptslibrary.net/visual-basic-net/118-socket-connect-and-data-send-in-vbnet Feras payment@lebmailer.com Function to connect to host machine, and send data via TCP Socket in VB.NET<br /> <br />First, add the following namespace<br /> Function to connect to host machine, and send data via TCP Socket in VB.NET<br /> <br />First, add the following namespace<br /> Auto-Fill ComboBox Using C# 2009-06-30T06:35:54Z 2009-06-30T06:35:54Z http://www.scriptslibrary.net/c-sharp/117-auto-fill-combobox-using-c Feras ferasc@hotmail.com This is simple code of how you fill a combobox automatically in C#.<br /> First, lets bind the combo with some data:<br /> This is simple code of how you fill a combobox automatically in C#.<br /> First, lets bind the combo with some data:<br /> Get User Domain Name in C# 2009-06-29T17:37:41Z 2009-06-29T17:37:41Z http://www.scriptslibrary.net/c-sharp/115-get-user-domain-name-in-c Feras ferasc@hotmail.com Get user domain name in C#<br /><br /><br />{CODE brush: cpp;}<br />        protected string GetUserDomainName()<br />        {<br />            return System.Environment.UserDomainName;<br /><br />        }<br />{/CODE} Get user domain name in C#<br /><br /><br />{CODE brush: cpp;}<br />        protected string GetUserDomainName()<br />        {<br />            return System.Environment.UserDomainName;<br /><br />        }<br />{/CODE} Play Audio Files Using VB.NET 2009-06-29T02:17:43Z 2009-06-29T02:17:43Z http://www.scriptslibrary.net/visual-basic-net/114-play-audio-files-using-vbnet Feras ferasc@hotmail.com Here is a simple example of how to play audio file in VB.NET.<br /><br /> It requires the System.Media Namespace:<br /> {CODE brush: vb;}Imports System.Media{/CODE}<br /><br /> And the code:<br /> {CODE brush: vb;}    Sub PlaySound(ByVal filepath As String)<br />        Dim soundplayer As New SoundPlayer<br />        soundplayer.SoundLocation = filepath<br />        soundplayer.Play()<br />    End Sub<br />{/CODE}<br /> <br /> Happy Coding. Here is a simple example of how to play audio file in VB.NET.<br /><br /> It requires the System.Media Namespace:<br /> {CODE brush: vb;}Imports System.Media{/CODE}<br /><br /> And the code:<br /> {CODE brush: vb;}    Sub PlaySound(ByVal filepath As String)<br />        Dim soundplayer As New SoundPlayer<br />        soundplayer.SoundLocation = filepath<br />        soundplayer.Play()<br />    End Sub<br />{/CODE}<br /> <br /> Happy Coding.