[PHP] Object pooling with PHP

2003-06-15 Thread Sephiroth
Hi,

Is it possible to implement an object pooling service with PHP?
Something like COM+ or IAS (Inprise Application Server)...
any ideas?

regards,
Sepho






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] progessive jpg

2002-10-03 Thread Sephiroth

Hi,
there a way to determine if the uploaded image is a standard jpeg or a progressive 
image?

I'm looking at the GD documentation but i can't find anything

--
---
Alessandro Crugnola [sephiroth]
Flash | PHP Developer
http://www.sephiroth.it

Team Macromedia Volunteer for Flash
http://www.macromedia.com/go/team




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[suspicious - maybe spam] [PHP] How to access remote files with php?

2005-01-18 Thread Sephiroth
Hi all,

How to access remote files with php?
For ex:
$sFile = "http://www.php.net/123.txt";;
if (file_exists($sFile)) {
  $hFile = fopen($sFile);
  ...
  fclose($hFile);
}


Regards,
Sephiroth

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[suspicious - maybe spam] [PHP] Re: How to access remote files with php?

2005-01-19 Thread Sephiroth

"Jason Barnett" <[EMAIL PROTECTED]> ?
news:[EMAIL PROTECTED]
>
> You can use the file functions with URLs so long as you have
> allow_url_fopen set to TRUE in your php.ini.
>

Doesn't works even
allow_url_fopen is true

PHP 4.3.10
Apache 1.3.27
Platform Windows 98

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [suspicious - maybe spam] [PHP] Re: How to access remote files with php?

2005-01-20 Thread Sephiroth
The error message:

HTTP/1.0 400 Bad Request Server: squid/2.5.STABLE5 Mime-Version: 1.0 Date:
Fri, 21 Jan 2005 01:48:05 GMT Content-Type: text/html Content-Length: 1213
Expires: Fri, 21 Jan 2005 01:48:05 GMT X-Squid-Error: ERR_INVALID_URL 0
X-Cache: MISS from ns1.autoera.com.tw X-Cache-Lookup: NONE from
ns1.autoera.com.tw:3128 Proxy-Connection: close

ERROR

The requested URL could not be retrieved

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Best way to encode?

2005-01-20 Thread Sephiroth
in HTML with HTTP_GET, you can use:
xxx.href = "my.php?data="+encodeURI(escape("...foreign strings..."));

my.php:

$data = uniDecode($_GET["data"]);
echo $data;



function uniDecode($sText) {
  $sData = preg_replace_callback("/%u[0-9A-Za-z]{4}/",toUtf8, $sText);
  return unescape($sData);
}

function toUtf8($ar) {
  $c = "";
  foreach($ar as $val) {
$val = intval(substr($val,2),16);
if($val < 0x7F){// -007F
  $c .= chr($val);
}
elseif ($val < 0x800) { // 0080-0800
  $c .= chr(0xC0 | ($val / 64));
  $c .= chr(0x80 | ($val % 64));
}
else {  // 0800-
  $c .= chr(0xE0 | (($val / 64) / 64));
  $c .= chr(0x80 | (($val / 64) % 64));
  $c .= chr(0x80 | ($val % 64));
}
  }
  return $c;
}

function unescape($sText) {
  $sTranArray = array("%09" => "\t",
  "%0A" => "\n",
  "%0B" => "\x0b",
  "%0D" => "\r",
  "%20" => " ",
  "%21" => "!",
  "%22" => "\"",
  "%23" => "#",
  "%24" => "$",
  "%25" => "%",
  "%26" => "&",
  "%27" => "'",
  "%28" => "(",
  "%29" => ")",
  "%2C" => ",",
  "%3A" => ":",
  "%3B" => ";",
  "%3C" => "<",
  "%3D" => "=",
  "%3E" => ">",
  "%3F" => "?",
  "%5C" => "\\",
  "%5B" => "[",
  "%5D" => "]",
  "%5E" => "^",
  "%60" => "`",
  "%7C" => "|",
  "%7B" => "{",
  "%7D" => "}",
  "%7E" => "~");
  return strtr($sText, $sTranArray);
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php