Weird hex code on top of document

Author Message

Gabriel Finkelstein

Wednesday 30 July 2008 4:31:19 pm

Hi!
I'm getting some weird hexadecimals on top of the destination page whenever I try to use eZHTTPTool::sendHTTPRequest.
I run it like:

eZHTTPTool::sendHTTPRequest("http://mywebsite.com/foo")

And at the very beginning of the result page (before any HTML code) I get a random hexadecimal of length 4. Some examples:
b2af
b2b0
b2b5
b2b3

If I change the URL to some other website:

eZHTTPTool::sendHTTPRequest("http://google.com")

I don't get any hexadecimals.

But if I change it to any other ez publish website, for example:

eZHTTPTool::sendHTTPRequest("http://ez.no")

I get the same kind of hexadecimals on top of the ez.no website (look at the screenshot)
http://img291.imageshack.us/img291/1558/clipboard01vv0.png
(of course, there's no css styles, since they're included with a relative path)

Does anyone have any clue about what's going on?

PS: I'm running this code inside a custom action

Nicolas Lescure

Thursday 31 July 2008 2:03:14 am

Hi,

I had the same problem with eZ 3.9. I didn't solve it. It depends of the servers.

If you want to get the html of a distant website, I think you should use PHP methods, such as "file_get_contents". If you want to send post parameters, have a look on CURL.

Gabriel Finkelstein

Thursday 31 July 2008 1:59:46 pm

It didn't occure to me to use CURL. It worked fine. Thanks!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.