<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8223218</id><updated>2012-02-12T03:16:44.530-08:00</updated><category term='datatypes'/><category term='ASP'/><category term='integer'/><category term='long VBScript'/><title type='text'>Fischer Tirado</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://fischer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8223218.post-3705165166437370819</id><published>2010-05-19T10:05:00.001-07:00</published><updated>2010-05-19T10:05:39.044-07:00</updated><title type='text'>How to fix orphaned SQL Server users</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: verdana, arial, helvetica, code2000, sans-serif; font-size: medium; "&gt;&lt;h1 style="font-family: 'trebuchet ms', arial, helvetica, code2000, sans-serif; font-size: xx-large; margin-bottom: 0px; margin-top: 0px; "&gt;&lt;/h1&gt;&lt;h2 style="font-family: 'trebuchet ms', arial, helvetica, code2000, sans-serif; font-size: x-large; margin-bottom: 0px; margin-top: 0px; "&gt;Summary&lt;/h2&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;When you restore a Microsoft SQL Server database on a different machine, you cannot access the database until you fix the permissions.&lt;/p&gt;&lt;hr style="background-color: rgb(0, 0, 0); border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; color: rgb(0, 0, 0); "&gt;&lt;h2 style="font-family: 'trebuchet ms', arial, helvetica, code2000, sans-serif; font-size: x-large; margin-bottom: 0px; margin-top: 0px; "&gt;Detail&lt;/h2&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;The problem is that the user in the database is an "orphan". This means that there is no login id or password associated with the user. This is true even if there is a login id that matches the user, since there is a GUID (called a &lt;code&gt;SID&lt;/code&gt; in Microsoft-speak) that has to match as well.&lt;/p&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;This used to be a pain to fix, but currently (SQL Server 2000, SP3) there is a stored procedure that does the heavy lifting.&lt;/p&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;All of these instructions should be done as a database admin, with the restored database selected.&lt;/p&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;First, make sure that this is the problem. This will lists the orphaned users:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;&lt;code&gt;EXEC sp_change_users_login 'Report'&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;If you already have a login id and password for this user, fix it by doing:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;&lt;code&gt;EXEC sp_change_users_login 'Auto_Fix', '&lt;i&gt;user&lt;/i&gt;'&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;If you want to create a new login id and password for this user, fix it by doing:&lt;/p&gt;&lt;blockquote&gt;&lt;p style="font-size: small; font-family: verdana, arial, helvetica, code2000, sans-serif; "&gt;&lt;code&gt;EXEC sp_change_users_login 'Auto_Fix', '&lt;i&gt;user&lt;/i&gt;', '&lt;i&gt;login&lt;/i&gt;', '&lt;i&gt;password&lt;/i&gt;'&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-3705165166437370819?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/3705165166437370819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/3705165166437370819'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2010/05/how-to-fix-orphaned-sql-server-users.html' title='How to fix orphaned SQL Server users'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-8223218.post-1522457147098161771</id><published>2009-07-03T11:51:00.000-07:00</published><updated>2009-07-03T11:55:51.014-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='long VBScript'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='integer'/><category scheme='http://www.blogger.com/atom/ns#' term='datatypes'/><title type='text'>Visual Basic 6.0 - Data Types</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;• &lt;strong&gt;&lt;span style="font-size:130%;"&gt;Byte &lt;/span&gt;&lt;/strong&gt;The Byte data type is an 8-bit variable which can store value from 0 to 255. This data type is very useful for storing binary data. It can also be very useful when sending/receiving byte values to/from a Basic Stamp or PIC.&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;&lt;span style="font-size:130%;"&gt;Double&lt;/span&gt;&lt;/strong&gt; The Double data type is a 64-bit floating point number used when high accuracy is needed. These variables can range from -1.79769313486232e308 to -4.94065645841247e-324 for negative values and from 4.94065645841247e-324 to 1.79769313486232e308 for positive values.&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;&lt;span style="font-size:130%;"&gt;Integer&lt;/span&gt;&lt;/strong&gt; The Integer data type is a 16-bit number which can range from -32768 to 32767. Integers should be used when you are working with values that can not contain fractional numbers.&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;&lt;span style="font-size:130%;"&gt;Long&lt;/span&gt;&lt;/strong&gt; The Long data type is a 32-bit number which can range from -2,147,483,648 to 2,147,483,647. Long variables can only contain non-fractional integer values. I myself use Long variables over Integers for increased performance. Most Win32 functions use this data type for this reason.&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;&lt;span style="font-size:130%;"&gt;Single&lt;/span&gt;&lt;/strong&gt; The Single data type is a 32-bit number ranging from -3.402823e38 to -1.401298e-45 for negative values and from 1.401298e-45 to 3.402823e38 for positive values. When you need fractional numbers within this range, this is the data type to use.&lt;br /&gt;&lt;br /&gt;• &lt;strong&gt;&lt;span style="font-size:130%;"&gt;String&lt;/span&gt;&lt;/strong&gt; The String data type is usually used as a variable-length type of variable. A variable-length string can contain up to approximately 2 billion characters. Each character has a value ranging from 0 to 255 based on the ASCII character set. Strings are used when Text is involved.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-1522457147098161771?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/1522457147098161771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/1522457147098161771'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2009/07/visual-basic-60-understanding-and.html' title='Visual Basic 6.0 - Data Types'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-8223218.post-5125588159443822499</id><published>2009-04-20T14:15:00.000-07:00</published><updated>2009-04-20T14:23:17.523-07:00</updated><title type='text'>Twitter API PHP</title><content type='html'>&lt;?php&lt;br /&gt;/*&lt;br /&gt;Ejemplo de instancia&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;require_once('class/twitter.class.php');&lt;br /&gt;&lt;br /&gt;/* Metodo Constructor para Twitter */&lt;br /&gt;$twitter = new Twitter('miusuario','mipass');&lt;br /&gt;&lt;br /&gt;        // Ejemplo :)&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;h1&gt;Todos los mensajes de Fayerwayer&lt;/h1&gt;";&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;pre&gt;";&lt;br /&gt;&lt;a href="http://www.php.net/print_r"&gt;print_r&lt;/a&gt;($twitter-&gt;lineaTiempo('fayerwayer'));&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;/pre&gt;";&lt;br /&gt;&lt;br /&gt;// Quieres realmente postear este mensaje? Descomentalo&lt;br /&gt;//$twitter-&gt;postearMensaje('Mi mensaje de pruebas desde API PHP para Twitter por framirez');&lt;br /&gt;&lt;br /&gt;// Todos mis seguidores&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;h1&gt;Todos mis seguidores&lt;/h1&gt;";&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;pre&gt;";&lt;br /&gt;&lt;a href="http://www.php.net/print_r"&gt;print_r&lt;/a&gt;($twitter-&gt;seguidores());&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;/pre&gt;";&lt;br /&gt;&lt;br /&gt;// Ahora quiero ver todos mis mensajes&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;h1&gt;Todos mis mensajes&lt;/h1&gt;";&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;pre&gt;";&lt;br /&gt;foreach($twitter-&gt;lineaTiempo() as $mensajes):&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;p&gt;Mensaje: " . $mensajes['mensaje'] . " posteado a las " . $mensajes['hora'] . " desde " . $mensajes['desde'] ."&lt;/p&gt;";&lt;br /&gt;endforeach;&lt;br /&gt;&lt;a href="http://www.php.net/echo"&gt;echo&lt;/a&gt; "&lt;/pre&gt;";&lt;br /&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;@author: Fabian Ramirez Sepulveda&lt;br /&gt;@email  : framirez(ARROB)gurunet.cl&lt;br /&gt;@web    : http://www.gurunet.cl/framirez&lt;br /&gt;&lt;br /&gt;@desc: Proyecto para tener una API desde PHP mas accesible y facil para usuarios no avanzados.&lt;br /&gt;&lt;br /&gt;@metodos:&lt;br /&gt;lineaTiempo( $nickNameAmigo=opcional) - "Nos retorna todos los ultimos 10 mensajes que nuestro amigo o nosotros hemos posteado"&lt;br /&gt;tomarMensaje($idmensaje) - "Nos retorna el detalle completo del mensaje"&lt;br /&gt;postearMensaje($mensaje) - "Posteamos en tiempo real el mensaje desde PHP"&lt;br /&gt;seguidores() - "Nos retorna todos nuestros amigos que nos siguen"&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// Libreria necesaria para procesar Xpath&lt;br /&gt;require_once('XPath.class.php');&lt;br /&gt;&lt;br /&gt;class Twitter {&lt;br /&gt;&lt;br /&gt;var $usuario='';&lt;br /&gt;    var $password='';&lt;br /&gt;&lt;br /&gt;// Headers de nuestro cliente&lt;br /&gt;var $agente  = 'Twitter PHP Class by framirez';&lt;br /&gt;var $headers = &lt;a href="http://www.php.net/array"&gt;array&lt;/a&gt;('X-Twitter-Client: Twitter PHP by framirez',&lt;br /&gt;                        'X-Twitter-Client-Version: 1.0',&lt;br /&gt;                        'X-Twitter-Client-URL: http://www.gurunet.cl/framirez');&lt;br /&gt;&lt;br /&gt;// Curl&lt;br /&gt;var $ch;&lt;br /&gt;&lt;br /&gt;// Respuesta&lt;br /&gt;var $respuesta;&lt;br /&gt;&lt;br /&gt;var $xml;&lt;br /&gt;&lt;br /&gt;    function Twitter($usuario=null, $password=null) {&lt;br /&gt;$this-&gt;usuario = $usuario;&lt;br /&gt;$this-&gt;password = $password;&lt;br /&gt;&lt;br /&gt;// Metodo constructor automaticamente llama a Xpath&lt;br /&gt;$this-&gt;xml = new XPath();&lt;br /&gt;}  &lt;br /&gt;    /*&lt;br /&gt;@desc: Retornamos el maximo de 10 mensajes de amigos o mios&lt;br /&gt;         */&lt;br /&gt;    function lineaTiempo($nick = null) {&lt;br /&gt;&lt;br /&gt;if(&lt;a href="http://www.php.net/empty"&gt;empty&lt;/a&gt;($nick)):&lt;br /&gt;$this-&gt;ch = curl_init("http://twitter.com/statuses/user_timeline.xml");&lt;br /&gt;$this-&gt;xml-&gt;importFromString($this-&gt;setearOpcionesCurl());&lt;br /&gt;else:&lt;br /&gt;$this-&gt;ch = curl_init("http://twitter.com/statuses/user_timeline/" . $nick . ".xml");&lt;br /&gt;$this-&gt;xml-&gt;importFromString($this-&gt;setearOpcionesCurl());&lt;br /&gt;endif;&lt;br /&gt;&lt;br /&gt;// Xpath Match&lt;br /&gt;$id =  $this-&gt;xml-&gt;match('//id');&lt;br /&gt;$nickname =  $this-&gt;xml-&gt;match('//screen_name');&lt;br /&gt;$texto = $this-&gt;xml-&gt;match('//text');&lt;br /&gt;$hora = $this-&gt;xml-&gt;match('//created_at');&lt;br /&gt;$desde = $this-&gt;xml-&gt;match('//location');&lt;br /&gt;$deDonde = $this-&gt;xml-&gt;match('//source');&lt;br /&gt;&lt;br /&gt;// Variables Temporales&lt;br /&gt;$i=0;&lt;br /&gt;$arregloMensajes = &lt;a href="http://www.php.net/array"&gt;array&lt;/a&gt;();&lt;br /&gt;&lt;br /&gt;// Recorro el arreglo&lt;br /&gt;for($i=0;$i&lt;count($texto);$i++):&lt;br /&gt;$arregloMensajes[$i]['id'] = $this-&gt;xml-&gt;getData($id[$i]);&lt;br /&gt;$arregloMensajes[$i]['usuario'] = $this-&gt;xml-&gt;getData($nickname[$i]);&lt;br /&gt;$arregloMensajes[$i]['mensaje'] = $this-&gt;xml-&gt;getData($texto[$i]);&lt;br /&gt;$arregloMensajes[$i]['hora'] = $this-&gt;xml-&gt;getData($hora[$i]);&lt;br /&gt;$arregloMensajes[$i]['desde'] = $this-&gt;xml-&gt;getData($desde[$i]);&lt;br /&gt;$arregloMensajes[$i]['donde_proviene'] = $this-&gt;xml-&gt;getData($deDonde[$i]);&lt;br /&gt;$i++;&lt;br /&gt;endfor;&lt;br /&gt;&lt;br /&gt;$this-&gt;xml-&gt;reset();&lt;br /&gt;return $arregloMensajes;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function tomarMensaje($id) {&lt;br /&gt;$this-&gt;ch = curl_init("http://twitter.com/statuses/user_timeline.xml");&lt;br /&gt;$this-&gt;xml-&gt;importFromString($this-&gt;setearOpcionesCurl());&lt;br /&gt;&lt;br /&gt;// Xpath Match&lt;br /&gt;$id =  $this-&gt;xml-&gt;match('//id');&lt;br /&gt;$nickname =  $this-&gt;xml-&gt;match('//screen_name');&lt;br /&gt;$texto = $this-&gt;xml-&gt;match('//text');&lt;br /&gt;$hora = $this-&gt;xml-&gt;match('//created_at');&lt;br /&gt;$desde = $this-&gt;xml-&gt;match('//location');&lt;br /&gt;$deDonde = $this-&gt;xml-&gt;match('//source');&lt;br /&gt;&lt;br /&gt;// Variables Temporales&lt;br /&gt;$arregloMensajes = &lt;a href="http://www.php.net/array"&gt;array&lt;/a&gt;();&lt;br /&gt;&lt;br /&gt;// Recorro el arreglo&lt;br /&gt;$arregloMensajes['id'] = $this-&gt;xml-&gt;getData($id[0]);&lt;br /&gt;$arregloMensajes['usuario'] = $this-&gt;xml-&gt;getData($nickname[0]);&lt;br /&gt;$arregloMensajes['mensaje'] = $this-&gt;xml-&gt;getData($texto[0]);&lt;br /&gt;$arregloMensajes['hora'] = $this-&gt;xml-&gt;getData($hora[0]);&lt;br /&gt;$arregloMensajes['desde'] = $this-&gt;xml-&gt;getData($desde[0]);&lt;br /&gt;$arregloMensajes['donde_proviene'] = $this-&gt;xml-&gt;getData($deDonde[0]);&lt;br /&gt;&lt;br /&gt;$this-&gt;xml-&gt;reset();&lt;br /&gt;return $arregloMensajes;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function postearMensaje($mensaje) {&lt;br /&gt;&lt;br /&gt;if(&lt;a href="http://www.php.net/empty"&gt;empty&lt;/a&gt;($mensaje)):&lt;br /&gt;&lt;a href="http://www.php.net/die"&gt;die&lt;/a&gt;("Debes pasar como parametro el mensaje");&lt;br /&gt;else:&lt;br /&gt;$this-&gt;ch = curl_init("http://twitter.com/statuses/update.xml");&lt;br /&gt;$this-&gt;xml-&gt;importFromString($this-&gt;setearOpcionesCurl('status=' . &lt;a href="http://www.php.net/urlencode"&gt;urlencode&lt;/a&gt;($mensaje)));&lt;br /&gt;$this-&gt;xml-&gt;reset();&lt;br /&gt;endif;&lt;br /&gt;&lt;br /&gt;return true;   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function seguidores() {&lt;br /&gt;$this-&gt;ch = curl_init("http://twitter.com/statuses/followers.xml");&lt;br /&gt;$this-&gt;xml-&gt;importFromString($this-&gt;setearOpcionesCurl());&lt;br /&gt;// Xpath Match&lt;br /&gt;$id =  $this-&gt;xml-&gt;match('//id');&lt;br /&gt;$nickname =  $this-&gt;xml-&gt;match('//screen_name');&lt;br /&gt;$nombre = $this-&gt;xml-&gt;match('//name');&lt;br /&gt;$desde = $this-&gt;xml-&gt;match('//location');&lt;br /&gt;$web = $this-&gt;xml-&gt;match('//url');&lt;br /&gt;$foto = $this-&gt;xml-&gt;match('//profile_image_url');&lt;br /&gt;$descripcion = $this-&gt;xml-&gt;match('//description');&lt;br /&gt;&lt;br /&gt;// Variables Temporales&lt;br /&gt;$i=0;&lt;br /&gt;$arregloMensajes = &lt;a href="http://www.php.net/array"&gt;array&lt;/a&gt;();&lt;br /&gt;&lt;br /&gt;// Recorro el arreglo&lt;br /&gt;for($i=0;$i&lt;count($nickname);$i++):&lt;br /&gt;$arregloMensajes[$i]['id'] = $this-&gt;xml-&gt;getData($id[$i]);&lt;br /&gt;$arregloMensajes[$i]['nombre'] = $this-&gt;xml-&gt;getData($nombre[$i]);&lt;br /&gt;$arregloMensajes[$i]['desde'] = $this-&gt;xml-&gt;getData($desde[$i]);&lt;br /&gt;$arregloMensajes[$i]['usuario'] = $this-&gt;xml-&gt;getData($nickname[$i]);&lt;br /&gt;$arregloMensajes[$i]['web'] = $this-&gt;xml-&gt;getData($web[$i]);&lt;br /&gt;$arregloMensajes[$i]['foto'] = $this-&gt;xml-&gt;getData($foto[$i]);&lt;br /&gt;$arregloMensajes[$i]['descripcion'] = $this-&gt;xml-&gt;getData($descripcion[$i]);&lt;br /&gt;$i++;&lt;br /&gt;endfor;&lt;br /&gt;&lt;br /&gt;$this-&gt;xml-&gt;reset();&lt;br /&gt;return $arregloMensajes;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;function setearOpcionesCurl($post=false) {&lt;br /&gt;// Autentificamos&lt;br /&gt;curl_setopt($this-&gt;ch, CURLOPT_USERPWD, $this-&gt;usuario.':'.$this-&gt;password);&lt;br /&gt;&lt;br /&gt;if(!&lt;a href="http://www.php.net/empty"&gt;empty&lt;/a&gt;($post)){&lt;br /&gt;                       curl_setopt($this-&gt;ch, CURLOPT_POST, true);&lt;br /&gt;                      curl_setopt($this-&gt;ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;curl_setopt($this-&gt;ch, CURLOPT_VERBOSE, 1);&lt;br /&gt;curl_setopt($this-&gt;ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;        curl_setopt($this-&gt;ch, CURLOPT_USERAGENT, $this-&gt;agente);&lt;br /&gt;&lt;br /&gt;// Setamos la respuesta&lt;br /&gt;$respuesta = curl_exec($this-&gt;ch);&lt;br /&gt;curl_close($this-&gt;ch);&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.php.net/unset"&gt;unset&lt;/a&gt;($this-&gt;ch);&lt;br /&gt;&lt;br /&gt;return $respuesta;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-5125588159443822499?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/5125588159443822499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/5125588159443822499'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2009/04/twitter-api-php.html' title='Twitter API PHP'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-8223218.post-2429693043574772369</id><published>2009-02-05T13:31:00.001-08:00</published><updated>2009-02-06T07:21:43.210-08:00</updated><title type='text'>Free-Lance: Servicios</title><content type='html'>&lt;p&gt;Free-Lance&lt;/p&gt;&lt;p&gt;Se realizan aplicaciones, programas, módulos y formularios para páginas web (HTML o Flash)Asesoramiento completo en el desarrollo de websites, mas de 10 años de experiencia.&lt;/p&gt;&lt;h5&gt;TARIFARIO:&lt;/h5&gt;&lt;strong&gt;Módulos PHP:&lt;/strong&gt; &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="20"&gt;(*) &lt;/td&gt;&lt;td width="310"&gt;Catálogo de Productos/Servicios&lt;/td&gt;&lt;td align="right" width="58"&gt;$150&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Tienda Virtual&lt;br /&gt;(Catálogo + Carrito + Pago con VISA) &lt;/td&gt;&lt;td align="right"&gt;$200&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Administrador de contenido CMS&lt;br /&gt;(actualiza paginas en línea)&lt;/td&gt;&lt;td align="right"&gt;$150 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Administrador de contenido Multi-Idiomas&lt;/td&gt;&lt;td align="right"&gt;$200 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Oportunidades laborales en línea&lt;br /&gt;(recluta personal y genera reportes)&lt;/td&gt;&lt;td align="right"&gt;$150 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Buscador de Inmuebles&lt;br /&gt;(publicacion y venta de inmuebles)&lt;/td&gt;&lt;td align="right"&gt;$180 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Envío de postales electrónicas&lt;/td&gt;&lt;td align="right"&gt;$100&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Módulo de encuestas en línea&lt;br /&gt;(Crear encuestas, reportes, estadísticas)&lt;/td&gt;&lt;td align="right"&gt;$120 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Blogs administrables&lt;/td&gt;&lt;td align="right"&gt;$100 &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;strong&gt;&lt;br /&gt;Formularios PHP:&lt;/strong&gt; &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="20"&gt;(*) &lt;/td&gt;&lt;td width="310"&gt;Formulario de Contacto&lt;/td&gt;&lt;td align="right" width="58"&gt;$15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Formulario Recomienda esta página&lt;/td&gt;&lt;td align="right"&gt;$15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Formulario de Sugerencias&lt;/td&gt;&lt;td align="right"&gt;$15&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Formulario de Registro(zona segura con usuario/password)&lt;/td&gt;&lt;td align="right"&gt;$50&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;strong&gt;&lt;br /&gt;Formularios Flash:&lt;/strong&gt; &lt;table cellspacing="0" cellpadding="2" width="400" border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td width="20"&gt;(*) &lt;/td&gt;&lt;td width="310"&gt;Formulario de Contacto&lt;/td&gt;&lt;td align="right" width="58"&gt;$20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Formulario Recomienda esta página&lt;/td&gt;&lt;td align="right"&gt;$20&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;(*)&lt;/td&gt;&lt;td&gt;Formulario de Sugerencias&lt;/td&gt;&lt;td align="right"&gt;$20&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Otras aplicaciones:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Intranets / Extranets (PHP, .Net)&lt;br /&gt;(Depende de la evaluación previa)&lt;/p&gt;&lt;p&gt;(*) Soporte en Hosting y Dominios&lt;br /&gt;(*) Mailing (publicidad sólo a clientes)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Datos de Contacto&lt;/strong&gt;&lt;br /&gt;Email: &lt;a href="mailto:fishdev@gmail.com"&gt;fishdev@gmail.com&lt;/a&gt;&lt;br /&gt;Messenger: &lt;a href="mailto:fishercom@hotmail.com"&gt;fishercom@hotmail.com&lt;/a&gt;&lt;/p&gt;&lt;p&gt;(*) Se aceptan transferencias en viaBCP&lt;br /&gt;(*) Los precios mostrados son de referencia&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-2429693043574772369?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/2429693043574772369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/2429693043574772369'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2009/02/free-lance-se-realizan-aplicaciones.html' title='Free-Lance: Servicios'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-8223218.post-7410006881505761183</id><published>2009-01-23T13:14:00.000-08:00</published><updated>2009-01-23T14:00:16.316-08:00</updated><title type='text'>Flash Cookies: Local Shared Objects</title><content type='html'>&lt;h2&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Flash Cookies: Local Shared Objects&lt;/span&gt;&lt;/h2&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Before Flash MX it was pretty tricky to "remember" the data in a Flash movie. It could be done with a standard browser cookie (which can be hard to implement for someone with intermediate Flash skills), using a server-side script such as PHP or ASP or offline in Flash projector files with the undocumented fscommand "save". Flash MX's Shared objects allow you to store and retrieve the information within a Flash movie easily. Lets see how it works.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;What is a local shared object?&lt;/strong&gt;&lt;br /&gt;Flash MX Shared objects are a new feature that allow you to store information on the clients machine the same way as cookies would and retrieve it at a later time. An example of a suitable application for Shared objects data could be to remember the user's name, the number of the level he last played in a game,his highscore or anything else you can imagine.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Shared objects are stored in .sol files located in the Flash player directory of the user's profile, example: "C:/Documents and&lt;br /&gt;Settings/Administrator/ApplicationData/Macromedia/Flash Player", and have their own format.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Here is a working example of a movie using the Shared Object. Type in your name and age and click on "Save". Then, refresh this page to let Flash read and display the stored data:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" height="150" width="200" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"&gt;&lt;param name="_cx" value="5292"&gt;&lt;param name="_cy" value="3969"&gt;&lt;param name="FlashVars" value=""&gt;&lt;param name="Movie" value="http://www.bestflashanimationsite.com/swf/tutorials/shared_object.swf"&gt;&lt;param name="Src" value="http://www.bestflashanimationsite.com/swf/tutorials/shared_object.swf"&gt;&lt;param name="WMode" value="Window"&gt;&lt;param name="Play" value="0"&gt;&lt;param name="Loop" value="-1"&gt;&lt;param name="Quality" value="High"&gt;&lt;param name="SAlign" value=""&gt;&lt;param name="Menu" value="-1"&gt;&lt;param name="Base" value=""&gt;&lt;param name="AllowScriptAccess" value=""&gt;&lt;param name="Scale" value="ShowAll"&gt;&lt;param name="DeviceFont" value="0"&gt;&lt;param name="EmbedMovie" value="0"&gt;&lt;param name="BGColor" value=""&gt;&lt;param name="SWRemote" value=""&gt;&lt;param name="MovieData" value=""&gt;&lt;param name="SeamlessTabbing" value="1"&gt;&lt;param name="Profile" value="0"&gt;&lt;param name="ProfileAddress" value=""&gt;&lt;param name="ProfilePort" value="0"&gt;&lt;param name="AllowNetworking" value="all"&gt;&lt;param name="AllowFullScreen" value="false"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;embed src="http://www.bestflashanimationsite.com/swf/tutorials/shared_object.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="200" height="150"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Creating a shared object&lt;/strong&gt;&lt;br /&gt;First, we have to create a local shared object within a Flash movie. To do so,just put this line of code in the first frame of your movie:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;code class="code-as"&gt;local_data = SharedObject.getLocal("user_data");&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Now we have created an Object named "local_data" which is associated with a shared object on the local hard-drive named user_data. Note that in the feature, this data can be read from other movies from the same domain that created the Shared Object.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Writing data&lt;/strong&gt;&lt;br /&gt;Lets store something in our fresh created Shared Object. Lets say, we want to store the user's name and his age in it. To do so, use this:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;code class="code-as"&gt;local_data.data.user_name = "John Smith";&lt;br /&gt;local_data.data.user_age = 23;&lt;br /&gt;local_data.flush()&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Note that this code must be in the same level where you have created the Shared Object.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The flush() command is optional, it is used to write the information to disk immediately. If you don't use this command, Flash MX writes the shared object to a file when the SWF movie is closed or when the shared object is garbage-collected because it no longer has any references to it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Reading data&lt;/strong&gt;&lt;br /&gt;To retrieve data from a saved Shared Object, just use the following syntax:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;code class="code-as"&gt;stored_user_name = local_data.data.user_name;&lt;br /&gt;stored_user_age = local_data.data.user_age;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Don't forget that you still have to create the local_data shared object first. Now, the user's name is stored in a variable called "stored_user_name" and the user's age in the variable "stored_user_age"and you can use it anywhere in your movie.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;You can store more information in one Shared Object file in the same way. Similar to the way how we have saved simple text variables you can store whole arrays and other objects.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Important Point&lt;/strong&gt;&lt;br /&gt;There are some important things to remember when using the local Shared Objects in your movies:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The primary drawback of shared objects is that it can be overwritten/disabled/erased by the user (right click on the swf, and click on settings), so avoid to store information which is absolutely necessary to let the application work properly. Think of it as an additional feature.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://www.bestflashanimationsite.com/images/tutorials/4-1.jpg"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;img style="WIDTH: 213px; CURSOR: hand; HEIGHT: 136px" alt="" src="http://www.bestflashanimationsite.com/images/tutorials/4-1.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;a href="http://www.bestflashanimationsite.com/images/tutorials/4-1.jpg"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;The amount of the information you can store in a local Shared Object from one domain is set to 100 kb by default. If you will try to store more information, the Flash player will ask the user for a permission to increase this limit. Be sure the stage of your movie is at least this is the minimum size Macromedia Flash MX requires to display the dialog box.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;a href="http://www.bestflashanimationsite.com/images/tutorials/4-2.jpg"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;img style="WIDTH: 213px; CURSOR: hand; HEIGHT: 136px" alt="" src="http://www.bestflashanimationsite.com/images/tutorials/4-2.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Additional information&lt;/strong&gt;&lt;br /&gt;This tutorial covers the basics of the local Shared Object feature. You can read more about it and take a look at additional features at the Macromedia website:&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.macromedia.com/support/flash/ts/documents/local_so.htm" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;What is a Shared Object ?&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; &lt;/span&gt;&lt;a href="http://www.macromedia.com/support/flash/action_scripts/local_shared_object/" target="_blank"&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Using local shared objects in Macromedia Flash MX&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-7410006881505761183?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/7410006881505761183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/7410006881505761183'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2009/01/flash-cookies-local-shared-objects.html' title='Flash Cookies: Local Shared Objects'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-8223218.post-3881700231212436728</id><published>2009-01-23T12:23:00.000-08:00</published><updated>2009-01-23T12:27:17.765-08:00</updated><title type='text'>PHP Input FIlter</title><content type='html'>&lt;strong&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Cleaning up your inputs&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div class="article" style="MARGIN: 0px 0px 8px; BORDER-BOTTOM: #ccc 1px dashed"&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Cleaning up your inputs from $_POST, $GET and $_REQUEST is an important task if you’re looking at security of your PHP applications. You can prevent most kinds on Cross Site Scripting (XSS) attacks if you know how to clean up the user inputs. Here’s how to do it using an Input filtering class from PHP Classes. To get started, head over to the PHP Classes page for the &lt;/span&gt;&lt;a href="http://www.phpclasses.org/browse/package/2189.html"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Input Filter Class&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt; by Daniel Morris and download the class file.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Once you get the class file, here’s how you can go about cleaning up your input variables.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt; ?php&lt;br /&gt;&lt;br /&gt;$before = $_REQUEST['before'];&lt;br /&gt;&lt;br /&gt;$myFilter = new InputFilter();&lt;br /&gt;&lt;br /&gt;$after = $myFilter-&gt;process($before);&lt;br /&gt;&lt;br /&gt;echo $after;&lt;br /&gt;&lt;br /&gt;?&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;So if you pass the string “&lt;&gt;alert(’xss’);&lt; /script&gt; to the before in the code above, the input filter changes this to alert(’xss’); after removing the script tags. All you have to do is to instantiate the InputFilter class with the following line:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;$myFilter = new InputFilter();&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;and run your string to be processed using the process class:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;$after = $myFilter-&gt;process($before);&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;You can also send entire arrays to be processed by the InputFilter class:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;code&gt;$_POST = $myFilter-&gt;process($_POST);&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This class can also be used to remove specific HTML tags from your input string. Let’s say for example, you want to remove all the bold tags &lt;&gt; and &lt;&gt; from your html string, all you need to do is :&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt; ?php&lt;br /&gt;&lt;br /&gt;include 'class.inputfilter.php';&lt;br /&gt;&lt;br /&gt;$before = $_REQUEST['before'];&lt;br /&gt;&lt;br /&gt;$tags = array("b","strong");&lt;br /&gt;&lt;br /&gt;$myFilter = new InputFilter($tags, array(),1, 1);&lt;br /&gt;&lt;br /&gt;$after = $myFilter-&gt;process($before);&lt;br /&gt;&lt;br /&gt;echo $after;&lt;br /&gt;&lt;br /&gt;?&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;If we pass the string “&lt;&gt; test&lt; /strong&gt; &lt;&gt;hello world&lt; /em&gt;” the output of the script will be “test &lt;&gt;hello world &lt; /em&gt;”&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;If you’d like to retain only the &lt;&gt; and &lt;&gt; tags in the above example, change line 4 to read&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;$myFilter = new InputFilter($tags, array(),0, 1);&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;This will change the output to &lt;&gt;test &lt; /strong&gt; hello world&lt;br /&gt;&lt;br /&gt;Let’s break up the constructor for the InputFilter class :&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;InputFilter($tagsArray, $attrArray, $tagsMethod , $attrMethod);&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;$tagsArray is an array of user defined tags&lt;br /&gt;&lt;br /&gt;$arrtArray is an array of user defined attributes&lt;br /&gt;&lt;br /&gt;$tagsMethod = 0 or 1 where 0 is used when only user defined tags should be allowed. 1 is used to strip the user defined tags.&lt;br /&gt;&lt;br /&gt;Similarly $attrMethod is used to retain user defined attributes is it’s set as 0 and to strip user defined attributes if set to 1.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Let’s see the attribute filtering provided by this class in action. Let’s take the following html string as an example:&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt; xsrc="test.jpg" mce_src="test.jpg" target="_blank" onclick="dosomething();" onmouseover="dosomethingelse();"&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Let’s make an filter to just retain the src and target attributes in the html above&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;$tags = array("img","b");&lt;br /&gt;&lt;br /&gt;$attr = array("src","target");&lt;br /&gt;&lt;br /&gt;$myFilter = new InputFilter($tags, $attr,0, 0);&lt;br /&gt;&lt;br /&gt;$after = $myFilter-&gt;process($before);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;It’s as simple as that.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-3881700231212436728?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/3881700231212436728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/3881700231212436728'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2009/01/php-input-filter.html' title='PHP Input FIlter'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry><entry><id>tag:blogger.com,1999:blog-8223218.post-109450466789787170</id><published>2004-09-06T13:57:00.000-07:00</published><updated>2005-08-31T08:28:52.713-07:00</updated><title type='text'>Curriculum Vitae</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;span style="color:#333333;"&gt;&lt;strong&gt;Fischer Tirado Enco&lt;/strong&gt;&lt;br /&gt;Analista de Sistemas&lt;br /&gt;MCAD ID: 3086009&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="mailto:fishdev@gmail.com"&gt;&lt;span style="font-family:arial;color:#333333;"&gt;fishdev@gmail.com&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;strong&gt;EXPERIENCIA PROFESIONAL&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Asix S.A. / Lima, Perú (Junio 2000 – presente)&lt;br /&gt;Asesores, proveedores de soluciones integrales y desarrolladores de software enfocados en generar valor en empresas del sector privado y entidades del gobierno.&lt;br /&gt;&lt;br /&gt;Jefe de Sistemas&lt;br /&gt;· Dirección y desarrollo de proyectos en aplicaciones internet, intranets, extranets y workflows para clientes como Backus, Banco de Crédito del Perú, Telefónica del Perú, Telecom Italia Mobile, entre otros.&lt;br /&gt;· Desarrollo de los módulos de administración de contenido e integración de plataformas y bases de datos para viaBCP, viaPersonal y viaInmuebles del Banco de Crédito.&lt;br /&gt;· Implementación y asesoría para el desarrollo de la plataforma web de Backus. A través de esta plataforma, Backus genera más de US$80,000 mensuales de ingresos por la compra de cerveza Cristal y souvenirs.&lt;br /&gt;&lt;br /&gt;Media S.A. / Lima, Perú (Diciembre 1999 – Abril 2000)&lt;br /&gt;Asesores, proveedores de soluciones integrales y desarrolladores de sistemas.&lt;br /&gt;&lt;br /&gt;Analista y Desarrollador de Sistemas&lt;br /&gt;· Desarrollo de módulos de solicitudes de información y rediseño del web-site del Banco Santander Central Hispano (BSCH).&lt;br /&gt;· Desarrollo del sistema de control de clientes para el área de ventas de Media S.A.&lt;br /&gt;· Desarrollo del sistema de control de itenerarios a nivel internet para Serlipsa- Swissport.&lt;br /&gt;· Desarrollo de módulos de búsqueda, rediseño y administración de contenido del web-site de Tekno.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Banco de Crédito / Lima, Perú (Agosto 1999 – Noviembre 1999)&lt;br /&gt;&lt;br /&gt;Analista Programador&lt;br /&gt;· Desarrollo del Directorio Telefónico en ambiente Web usando SQL Server 6.5, ASP, DHTML.&lt;br /&gt;· Actualización del Sistema de Reportes de Tasas y Tarifas (Desarrollado para su intranet).&lt;br /&gt;· Desarrollo del Sistema de Control de Proyectos y Registro de Horas en ambiente Web usando SQL 6.5, ASP, DHTML.&lt;br /&gt;&lt;br /&gt;Cyberlink S.A. / Lima, Perú (Enero 1999 – Julio 1999)&lt;br /&gt;Asesores, proveedores de soluciones integrales y desarrolladores de sistemas.&lt;br /&gt;&lt;br /&gt;Analista Programador&lt;br /&gt;· Modulo de mantenimiento para un kiosko multimedia interactivo del Banco Wiese Sudameris.&lt;br /&gt;· Participación en el desarrollo del Nuevo Sistema de Trámite Documentario ONP(workflow desarrollado en ASP y SQL 7).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FORMACION ACADEMICA&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Diploma Técnico en Tecnologías de la Información.&lt;br /&gt;Institución: Instituto Superior Julio Cesar Tello, Lima – Perú. Graduación: Diciembre 1997.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;OTRA EXPERIENCIA&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;· Lenguajes de Programación: Visual Studio 6.0, Visual Studio .Net (C#, VB, Web Services), ODBC, OLEDB Providers, Component Services, ASP, PHP, XML, WML, WAP, DHTML, JavaScript.&lt;br /&gt;· Bases de Datos: MS. SQL Server 7.0/2000, Oracle 8i/9i PL/SQL, MySQL, MS. Access.&lt;br /&gt;· Plataformas de Desarrollo: WINDOWS NT/2000, MS Internet Information Server, Exchange Server, UNIX – LINUX, Apache Server, Oracle Internet Application Server.&lt;br /&gt;· Aplicativos: Macromedia Dreamweaver MX, Macromedia Flash MX, Internet Explorer 4.0/5.5/6.0, Netscape Navigator 4.7 - 7.0, MS Office 2000, Adobe Photoshop 7.0.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cursos Adicionales&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Agosto 1998 Telematic – INICTELSeminario CONTEC ‘98 (Comercio Electrónico, dynamic HTML, MS Exchange Server, Site Server, Lotus Notes, Novell Netware 5.0, MS Internet Information Server)&lt;br /&gt;&lt;br /&gt;Marzo 1999 Microsoft PerúDeveloper Days (Track 1 Desarrollando aplicaciones en 3 capas, Windows DNA)&lt;br /&gt;&lt;br /&gt;Enero 2000 Microsoft PerúDeveloper Days (Track 1 Desarrollando aplicaciones con Windows 2000)&lt;br /&gt;&lt;br /&gt;Marzo 2001 Microsoft PerúCurso de Comercio Electrónico (MS Comerse Server 2000, BizTalk Server, XML)&lt;br /&gt;&lt;br /&gt;Marzo 2002 Oracle PerúThink 9i (Oracle 9i, OAS, J2EE, Servlets, Portlets)&lt;br /&gt;&lt;br /&gt;Diciembre 2002 Microsoft PerúDeveloper Days (Desarrollo de aplicaciones en VS .Net, Internet Mobile ToolKit, Web Services)&lt;br /&gt;&lt;br /&gt;Agosto - Diciembre 2003 Microsoft Perú (Cibertec)&lt;br /&gt;Developing Microsoft ASP.NET Web Applications Using Visual Studio .NET&lt;br /&gt;Developing Microsoft .NET Applications for Windows (Visual Basic .NET)&lt;br /&gt;Building COM+ Applications Using Microsoft .NET Enterprise Services&lt;br /&gt;Developing XML Web Services Using Microsoft ASP.NET&lt;br /&gt;Exámenes de certificación MCAD aprobados:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.microsoft.com/traincert/exams/70-305.asp"&gt;&lt;span style="font-family:arial;font-size:85%;color:#666666;"&gt;Exam 70–305&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;color:#666666;"&gt;*: Developing and Implementing Web Applications with Microsoft Visual Basic® .NET and Microsoft Visual Studio® .NET&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.microsoft.com/traincert/exams/70-306.asp"&gt;&lt;span style="font-family:arial;font-size:85%;color:#666666;"&gt;Exam 70–306&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;color:#666666;"&gt;*: Developing and Implementing Windows-based Applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.microsoft.com/traincert/exams/70-310.asp"&gt;&lt;span style="font-family:arial;font-size:85%;color:#666666;"&gt;Exam 70–310&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;color:#666666;"&gt;*: Developing XML Web Services and Server Components with Microsoft Visual Basic .NET and the Microsoft .NET Framework&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;script language="javascript"&gt;var data, p; var agt=navigator.userAgent.toLowerCase(); p='http'; if((location.href.substr(0,6)=='https:')||(location.href.substr(0,6)=='HTTPS:')) {p='https';} data = '&amp;r=' + escape(document.referrer) + '&amp;n=' + escape(navigator.userAgent) + '&amp;p=' + escape(navigator.userAgent) + '&amp;g=' + escape(document.location.href);if(navigator.userAgent.substring(0,1)&gt;'3') {data = data + '&amp;sd=' + screen.colorDepth + '&amp;sw=' + escape(screen.width+ 'x'+screen.height)};document.write('&lt;a href="http://www.xtrastats.com" target="_blank" &gt;');document.write('&lt;img border=0 hspace=0 '+'vspace=0 src="http://www.xtrastats.com/counter.php?i=9614' + data + '"&gt;');document.write('&lt;/a&gt;');&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8223218-109450466789787170?l=fischer.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/109450466789787170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8223218/posts/default/109450466789787170'/><link rel='alternate' type='text/html' href='http://fischer.blogspot.com/2004/09/curriculum-vitae.html' title='Curriculum Vitae'/><author><name>BadFish</name><uri>http://www.blogger.com/profile/18191109900315946013</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://2.bp.blogspot.com/_kvxDSOiUdXo/SXoujCPNYfI/AAAAAAAAABk/Btb_KyftOKg/S220/IMG007.JPG'/></author></entry></feed>
