Cuestión : usted sabe una función como $notes = nl2br ($_POST [“notas”]); ¿en el ASP?

usted sabe una función como $notes = nl2br ($_POST [“notas”]); ¿en el ASP? el uso del
I una forma del email en mi Web site, pero email viene con sin cualquier breaklines. el PHP del
in allí es una función para eso $notes = nl2br ($_POST [“notas”]); ¿
what sobre el ASP?
thank usted.
class= > " claro " del
soluciones >Related class= href= " /Web_Development/Web_Languages-Standards/PHP/Q_26286851.html " title= el " del sending " qRelatedParent " del HTML con el PHP. Las líneas de rotura disapper cuando utilizo este jefe.

Respuesta : usted sabe una función como $notes = nl2br ($_POST [“notas”]); ¿en el ASP?

Respuestas… Después de que usted vea esto, leer por favor esta página cuidadosamente:
http://code.google.com/apis/maps/documentation/staticmaps/

(1) usted puede controlar el tamaño de la ventana hasta los pixeles 640x640
(2) Google puede hacer esto para usted - el mapa estático API puede aceptar fragmentos de la dirección o aún nombres de señales.  O usted puede utilizar un geocoder.  Google y Yahoo ofrecen geocoders.  Ver por favor el recorte de código para un ejemplo de esto.
(3) usted puede trazar muchas diversas localizaciones en un mapa.  Fijaré una respuesta de la carta recordativa con un ejemplo que demuestra algunas de las maneras que usted puede utilizar Google Maps API para fijar los pasadores o los iconos múltiples en un mapa.

Recuerdos, ~Ray
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
    
    


    Yahoo/versión parcial de programa de Google SimpleGeoCoder
    
    
    
    Addr:  
    Ciudad:  
    ST:   
    Cierre relámpago:  
    
    
    
    
    dirección = $_GET [“a”];
$demo->city    = $_GET [“c”];
$demo->state   = $_GET [“s”];
$demo->zip     = $_GET [“z”];


PRUEBA DE // YAHOO! GEOCODER
$demo->geocodeYahoo ();
eco PHP_EOL. “YAHOO! ”;
print_rr ($demo);


PRUEBA DE // EL GOOGLE GEOCODER
$demo->geocodeGoogle ();
eco PHP_EOL. “GOOGLE”;
print_rr ($demo);

// HECHO TODO
morir ();


CLASE SIMPLE DE // GEOCODER
clase SimpleGeoCoder
{
    // DECLARA LOS DATOS DE ENTRADA
    público $location;

    EL USO DE // ESTO PARA UNA PREGUNTA FREEFORM, O UTILIZA LAS PIEZAS
    público $address;
    público $city;
    público $state;
    público $zip;

    // DECLARA LOS DATOS DE TRABAJO
    $precis privado;

    // DECLARA LOS DATOS DE SALIDA
    público $latitude;
    público $longitude;
    público $precision;
    público $warning;
    público $geocoder;

    // DECLARA A CONSTRUCTOR
    __construct público de la función ()
    {
        $this->latitude  = 0.0;
        $this->longitude = 0.0;
        $this->precision = FALSO;  // QUIERE UN VALOR DE 5 O MÁS ALTO, MÁS ARRIBA ES MEJOR
        $this->warning   = '';
        $this->geocoder  = '';
        unset ($this->precis);
    }

    // DECLARA EL DATA-CLEANUP
    _cleanup privado de la función ($str)
    {
        ¡$str = preg_replace (“/[^ \” a-zA-Z0-9&! ¿el #$% () “+:? \/@, _ \. \ -]/', '', $str);
        ajuste de vuelta (preg_replace (“/\ s \ s+/”, '', $str));
    }

    // DECLARA YAHOO! VERSIÓN DEL CABALLO DE LABRANZA
    geocodeYahoo público de la función ()
    {
        ¡si (! definido (“YAHOO_API ")) definir (“YAHOO_API”, “YAHOO_API ");
        $this->geocoder = “Yahoo! ”;
        $yahooUrl       = “http://local.yahooapis.com/MapsService/V1/geocode?&appid=”. YAHOO_API;

        // QUE USTED PUEDE PEDIR UNA PREGUNTA FREEFORM
        ¡si ($this->location! = '')
        {
            $yahooUrl. = “&location=”. urlencode ($this->_cleanup ($this->location));
        }

        // QUE USTED PUEDE PEDIR PEDAZOS INDIVIDUALES DE UNA DIRECCIÓN
        
        {   $yahooUrl. = “&street=”. urlencode ($this->_cleanup ($this->address));
            $yahooUrl. = “&city=”   . urlencode ($this->_cleanup ($this->city));
            $yahooUrl. = “&state=”  . urlencode ($this->_cleanup ($this->state));
            $yahooUrl. = “&zip=”    . urlencode ($this->_cleanup ($this->zip));
        }

        // EJECUTA LA PREGUNTA DE YAHOO GEOCODER
        NOTA DE // - UTILIZAR LA SUPRESIÓN DEL ERROR O RASPARÁ HACIA FUERA LA LLAVE DE YAHOO API - SOBRE PETICIÓN DEL HTTP 400 DE LAS VUELTAS DE LA FALTA LA MALA
        si ($yfp = @fopen ($yahooUrl, “r "))
        {
            $yahooResponse = '';
            ¡mientras que (! feof ($yfp))
            {
                $yahooResponse. = fgets ($yfp);
            }
            fclose ($yfp);
        }
        
        {
            FALSO de vuelta;
        }

        // EXAMINA EL RESULTADO
        ¡si ($yahooResponse! = '') // NO VACÍO, CONSEGUIMOS DATOS
        {
            $ydata    = nuevo SimpleXMLElement ($yahooResponse);

            LA COMPROBACIÓN PARA DE // CUALQUIER MENSAJE DE ERROR, SI NINGUNO, EXTRAE LOS PUNTOS DE REFERENCIAS
            $yerror    = $ydata->Message;
            si (== de $yerror '')
            {
                $this->precis    = (secuencia) $ydata->Result [“precisión”];
                $this->warning   = (secuencia) $ydata->Result [“advirtiendo”];
                $this->latitude  = (secuencia) $ydata->Result->Latitude;
                $this->longitude = (secuencia) $ydata->Result->Longitude;

                // ESTAS DECLARACIONES SE PUEDE UTILIZAR PARA VOLVER LA DIRECCIÓN NORMALIZADA
                $this->address   = (secuencia) $ydata->Result->Address;
                $this->city      = (secuencia) $ydata->Result->City;
                $this->state     = (secuencia) $ydata->Result->State;
                $this->zip       = (secuencia) $ydata->Result->Zip;

                // FIJÓ LA PRECISIÓN A UN VALOR DEL NÚMERO
                si (cierre relámpago del == de $this->precis “")     {$this->precision = “5”; }
                si (calle del == de $this->precis “")  {$this->precision = “6”; }
                si (dirección del == de $this->precis “") {$this->precision = “8”; }
            }
            
            {
                FALSO de vuelta;
            }
        }

        // NINGÚN RESULTADO - ALGO ES ENFERMO EN YAHOO
        
        {
            FALSO de vuelta;
        }

        de vuelta VERDAD;
    } geocodeYahoo de la función del FINAL de //


    // DECLARA LA VERSIÓN DE GOOGLE DEL CABALLO DE LABRANZA
    geocodeGoogle público de la función ()
    {
        ¡si (! definido (“GOOGLE_API ")) definir (“GOOGLE_API”, “GOOGLE_API ");
        $this->geocoder = “Google”;
        $googleUrl      = “http://maps.google.com/maps/geo?key=”. GOOGLE_API. “&output=csv”;
        ¡si ($this->location! = '') // QUE USTED PUEDE PEDIR UNA PREGUNTA FREEFORM
        {
            $googleUrl. = “&q=”. urlencode ($this->_cleanup ($this->location));
        }
        // otro que USTED PUEDE PEDIR PEDAZOS INDIVIDUALES DE UNA DIRECCIÓN
        {
            $googleUrl. = “&q=”. urlencode (ajuste (
                    $this->_cleanup ($this->address)
            . ''. $this->_cleanup ($this->city)
            . ''. $this->_cleanup ($this->state)
            . ''. $this->_cleanup ($this->zip)
            ));
        }

        // EJECUTA PREGUNTA DE GOOGLE GEOCODER
        si ($gfp = @fopen ($googleUrl, “r "))
        {
            $googleResponse = '';
            ¡mientras que (! feof ($gfp))
            {
                $googleResponse. = fgets ($gfp);
            }
            fclose ($gfp);
        }
        
        {
            FALSO de vuelta;
        }

        EXTRACTO DE // QUE LOS DATOS DEL CSV ENCADENAN
        $gdata    = estallan (“,”, $googleResponse);
        ¡si ($gdata [0]! = EL CÓDIGO DE LA RESPUESTA DE “200”) // DEBE SER “200” -- SI 602 - MÁN CÓDIGO POSTAL O DIRECCIÓN INUTILIZABLE
        {
            FALSO de vuelta;
        }
        $this->precision = $gdata [1]; EXACTITUD DE // GEOCODE - EL CÓDIGO POSTAL = 5, NÚMEROS MÁS ELEVADOS ES MEJOR
        $this->latitude  = $gdata [2];
        $this->longitude = $gdata [3];
        de vuelta VERDAD;
    } geocodeGoogle de la función del FINAL de //

} clase SimpleGeocoder del EXTREMO de //



FUNCIÓN SIN RELACIÓN DE // PARA HACER QUE LA SALIDA DEMUESTRA LA INFORMACIÓN PÚBLICA SOLAMENTE
print_rr de la función ($thing)
{
    $str = print_r ($thing, VERDAD);
    $arr = estallan (PHP_EOL, $str);
    $num = cuenta ($arr) - 1;
    foreach ($arr como => $txt de $ptr)
    {
        si (preg_match (“/: ] privado/”, $txt))
        {
            unset ($arr [$ptr]);
        }
    }
    el eco implode (PHP_EOL, $arr);
}
Otras soluciones  
 
programming4us programming4us