# [proposal + pull request] Replace logo GUIDs with data URIs

- Thread: https://externals.io/message/61233
- Original archive: https://news-web.php.net/php.internals/61233
- Started by Andrew Faulds on 2012-07-14T20:49:27+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #61233 — Andrew Faulds — 2012-07-14T20:49:27+00:00

URL: https://externals.io/message/61233#61233

Hi there,

This is a patch that replaces PHP's infamous logo GUIDs with data URIs
instead, and also embed PHP credits in the `phpinfo()` page, hidden
using JavaScript (but gracefully degrading), to eliminate these GUIDs
altogether.

:)

https://github.com/php/php-src/pull/132

-- 
Andrew Faulds (AJF)
http://ajf.me/

---

## #61235 — Rasmus Lerdorf — 2012-07-14T21:16:06+00:00

URL: https://externals.io/message/61233#61235 · In reply to: #61233

> Hi there,
> 
> This is a patch that replaces PHP's infamous logo GUIDs with data URIs
> instead, and also embed PHP credits in the `phpinfo()` page, hidden
> using JavaScript (but gracefully degrading), to eliminate these GUIDs
> altogether.
> 
> :)
> 
> https://github.com/php/php-src/pull/132

Looks ok to me. master-only, of course. It is simpler and cleaner than
the GUID approach and I think enough browsers can handle data URIs these
days.

-Rasmus

---

## #61236 — Hannes Magnusson — 2012-07-14T21:26:55+00:00

URL: https://externals.io/message/61233#61236 · In reply to: #61233

> Hi there,
>
> This is a patch that replaces PHP's infamous logo GUIDs with data URIs
> instead, and also embed PHP credits in the `phpinfo()` page, hidden
> using JavaScript (but gracefully degrading), to eliminate these GUIDs
> altogether.
>
> :)
>
> https://github.com/php/php-src/pull/132


The sapi/cli/tests/php_cli_server_011.phpt testcase looks like a real testcase..
It should probably be rewritten then removed completely.

And I actually know of websites using the functions to display the logo..
Is there some way we could provide a BC function for it somehow?
Maybe rather then removing the functions, make then return the data uris?

-Hannes

---

## #61237 — Brandon Wamboldt — 2012-07-14T21:29:32+00:00

URL: https://externals.io/message/61233#61237 · In reply to: #61235

FYI, data URIs are only supported in IE8 or higher, IE7 and below do not
support them.



> 
> > […]
>
> Looks ok to me. master-only, of course. It is simpler and cleaner than
> the GUID approach and I think enough browsers can handle data URIs these
> days.
>
> -Rasmus
>
> --
> 
> 
>
>


-- 
*Brandon Wamboldt*
Programmer / Web Developer

StackOverflow Careers
Profile<http://careers.stackoverflow.com/brandonwamboldt>- GitHub
Profile <https://github.com/brandonwamboldt> -
LinkedIn<https://github.com/brandonwamboldt> -
My Blog <http://brandonwamboldt.ca/

---

## #61238 — Stas Malyshev — 2012-07-14T21:48:57+00:00

URL: https://externals.io/message/61233#61238 · In reply to: #61236

Hi!

> And I actually know of websites using the functions to display the logo..
> Is there some way we could provide a BC function for it somehow?
> Maybe rather then removing the functions, make then return the data uris?

Having the functions to get the images sounds like a good idea, some
sites may want to use them to display the logos. However, I don't think
we should use the same function, as then deciding what the function
actually does is complicated. I'd rather prefer doing something like:

if(function_exists('php_logo_guid')) {
  $url = "/index.php?=".php_logo_guid();
} else if(function_exists('php_logo_url')) {
  $url = php_logo_url();
}
if(!empty($url))
echo "<img src=\"$url\" alt=\"php logo\">";

it's clear what each function gives me then.

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #61278 — Nikita Popov — 2012-07-16T09:24:07+00:00

URL: https://externals.io/message/61233#61278 · In reply to: #61238

> Having the functions to get the images sounds like a good idea, some
> sites may want to use them to display the logos. However, I don't think
> we should use the same function, as then deciding what the function
> actually does is complicated. I'd rather prefer doing something like:
>
> if(function_exists('php_logo_guid')) {
>   $url = "/index.php?=".php_logo_guid();
> } else if(function_exists('php_logo_url')) {
>   $url = php_logo_url();
> }
> if(!empty($url))
> echo "<img src=\"$url\" alt=\"php logo\">";
>
> it's clear what each function gives me then.
I don't think that this is really necessary. If you want to use the
PHP logo, just embed it into your website using some URL. We don't
need to provide data: URLs for that.

Besides, adding a new function and removing the old one would require
application changes for the people who used the GUIDs. And in that
case it doesn't make much of a difference whether they switch to using
data: URLs provided by yet another function or whether they just use a
normal URL to a PHP logo.

So +1 on removing GUIDs, -1 on adding new functions.

Nikita

---

## #61336 — Pierre Joye — 2012-07-17T08:27:04+00:00

URL: https://externals.io/message/61233#61336 · In reply to: #61237

hi,

On Sat, Jul 14, 2012 at 11:29 PM, Brandon Wamboldt
<brandon.wamboldt@gmail.com> wrote:
> FYI, data URIs are only supported in IE8 or higher, IE7 and below do not
> support them.

That's fine, not like it is a mission critical feature anyway.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
