Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7990841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:07:32+00:00 2026-06-04T13:07:32+00:00

I got an image through API request, and I got Array ( [code] =>

  • 0

I got an image through API request, and I got

  Array
(
    [code] => 200
    [headers] => Array
        (
            [cache-control] => maxage=15552000
            [content-type] => image/png
            [date] => Thu, 05 Apr 2012 02:14:10 GMT
            [expires] => Tue, 02 Oct 2012 02:14:11 GMT
            [p3p] => CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
            [pragma] => public
            [server] => Apache
            [set-cookie] => CAKEPHP=ni9r4qo9ia4a0os2; expires=Sun, 05-Apr-2037 08:14:10 GMT; path=/; domain=.somedomain.com
            [vary] => Accept-Encoding,User-Agent
            [content-length] => 4303
            [connection] => keep-alive
        )

[body] => ‰PNG

IHDRôôî½€V pHYsHHFÉk> vpAgôôL´£<�
IDATxÚí?¯ãÆGÆ3ì ÿ¼k'¤ZìA z°HŠ)\°w³.÷,ÀÊíøâ‚ö'PÂüB$Ž
öªÕ)€BRÚ·Zk†œ¯æÍêžShõÞÓ½;Ô)Jäðgv s߀ø ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒ‚t… ]!HWÒr$}[gæ^X4òË%¼,Y½½oS‚I¯M±jî:7éÅ^–Uaêû6%È‘ô¬¸¯AÌKéŽùB¸a‘Ez.bp$ݬîke.¾XÒ˲º¦ŸcéÍ}
¢’—.½,
Ò…Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\îÒ¥Az\&K—Hâ@z\&IßÖÅܘ¬œšjWzaæû;+óòas3e‚ôÛ.©OEš˜þWzëz¿y*©ú;3šËƒô=›ÌÌ»¨”æîÉ;—¸Ò·Æ,û;íVjÿ/ÛV!}ÏÌd‡§ª0Ó‚r"¿§ç¦ÏrÚ˜ùl/{aF€ôÃÓpW°­ÂJJdéK3ÛÿS,ö/ÖÙaÕ\Zé!Þ#çK¯ŒXTYdé›ýËuaêÚt‰pODzψÞÅþÈ6ï÷AÚmû¦ß‘¯^î΀ôžùĽ·#bK/»TÓÝÌ»u<7ã HïÉÞ\é«no½ìTwªÛ~7t=¼ÿŽôžÓ]Þª[mJ³Ûæ£#7k5gêUûµê÷ëòá
¤÷¿n¿YvÏç./R—¾0å¶ÿl¾m…—ýÎI¾ZíÍ!ýð4Ü}µÍæ]mµÈv«EÛ±I]zmæÍþÃGfÖó~9òy9[-­ôï‘ _Îäæå³TìïUU¶.ê7Azû¡­Øï’”íþ[¾ÚåŸÖ‘¾§}æLÕì6Ëì°ÎWÕ²˜ïÞé»îˆAÿ¦;|ÐÝi·U¤Ónì÷ã«jcжc³Ìš ãnñ¥Wí <ŒÞä+6ï>l—yë}^
ëzW®wù.oY‡ô‰/}ç‡Ïæåa¬y½:Ò†ti8‰".H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.H÷éÒ =.ÇÒëóÛL#4¼oœÙh6v õ•J_ˆ?õžlå_nÅxNr¹X„tIo̼¬îÂÌ‚½|X›™ä²”³û{ï»Ç[­M™ßµ¸óvY*Ñ!V›éCJ‡kz«O®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®Uúja‚˜ÍKÝ.çaóZd3ûÀ6Õ,¬ÏbõªøJ¥¯Úç¼ ¡œ\’¡˜A
[¹6ëMèÀªYfN6«‚ÚÔùÑû+•~U•\Õ7áWË(2ß_Ò˜õé/×áIÈŠ»»W*ýŒš?g\hhe+É«à>sKI~y•£«9]«ôF¸äét[É×ãBzp ÒÓéC%H÷+Azú }¨é~%HO¤• ݯéé#'ýp5˩ҷ‡>S¥¾6Dº…3¤?þ¯õ×Õ£ÛîPÅwƒþð‡£óY5Ô?Ügq{ôçËî[ÙÛðë#ÝVò­õו1æá‹Õ·×ô¦;ÒõñróäŒ5ýó£þÖ¶ytÛ|Κ~ŠKú6w.ðرÉÝÿ¬eë,w©il]~î’^ס˜ÜzàÖµÎC1z¥W…[º{Moù…CúvѸ"
N×tsc8¤—åz¶²ÿédMoyÇ%};Ÿ¹]­ô²³7ïGŠDØæ}³ÌW@Ú¼—eîXt¤[8wGn9slÞÃväêÜ•@²#×Ì·H?a
M·—Œ}d[çkÇ_‚>²µ¯ˆÌµyøÈ–ÏóYf^éuaª&¬dSzVTU@‰Kz>[87ï_ά›&[Úû(–^U²Ò7]ÄK@‰óË™ué
5 üF®v¼Ûè•~v _æ҇JîW‚ôôAúP ÒýJž>H*¹VéLv8)¹zéLk:áú§5
Mü^rã¿»›ÿLžÀøCwóãô Œ?Þ5S8Ñ1#ø÷ÝÍ{’S•?èn~;yªòƒîæÝéS•ß½k¦pª²“?™Õô&ǬÍC‘>OeBäkótüAʤ¯y.ÛñÖˆ¼Œ6Æ<“N»OýV&½º1d;>2æ…@›å11ò[cn–£R&ý©‘Y1ïXwg²ôÉÚ>Û÷º;?gôQº¤oº]‰ó޲]CÍzr›~o<Ï»>£Ûw]Ò—oug¼Iv|Ü=Ë·“ÛÔÝkGà§Ûq¿Ýbè’žõŸ^¦¯˜wôk¨ùãä>Ïú>“ßxV}›Ñ=B]Ò›¦1M3¾{ëͶoؤ2°ßptI¿ÄK5êãÓé©4Dúå@:ÒÓiˆôËt¤§Óé—éHO§!Ò/Ò‘žNC¤¤¯ôðsäFNa:G®)¬gÂ
ÌqŽœu8ïÝ5û)EóªøJ¥'|6lv6lé:¶;6»þ³aÅÏ{ßrÞ{ò`†KðlÌp‰sÙ†JîW‚ôôAúP ÒýJž>H*Aº_ ÒÓéC%H÷+Azú\mœÇ¡
Ò-ˆÆyt_ƒ~>‹å‡~h̳ýU ¿
îCœ‡'iÆy|VÄyܘöeHœ‡gœÇâüd;Cq¯ýÐáNvؕƵòÚ’~EœÇ)Î%>‚#Î#ˆó°àÊp)
wœ‡õh½c)¶q'œçñà¹DœÇÍpœGíçñbEœ‡Á8ö
½ýç»'®:wœÇë;rŸ-»Ç¹ã<2¿8ý~%qäâ<6#u›L$ÎcEœÇd\Ò×Kãš~nœÇÒ5œ8ȼyq
qSákØ¡¤û• =}>T‚t¿¤§Ò‡JîW‚ôô¹¦8Ì&=x¢ŒéWçÑxþr˜ëŸÖ´2‹•ôFëŒÁOtÇyXVÍíçÖ8ï5ÄyÔÖ’ý$Þ÷f¿Â17øòq¥}ªrIœ‡7ÄyìÔI'ΣC™ôêFörïýß§_î8K’tœ‡ÀÀº¾çñ:ÉÆyl»IÅyŒn1tIïã<$VÌ;>éže8~¯{úpúwâ<^ƒ8]Òâ<:tI¿ÄsñÀôA:ÒÓiˆôËt¤§Óé—éHO§!Ò/Ò‘žNC¤_¤#=†HŸL籋ó¨­çÈ}èH*Aº_ ÒÓ'½8ÿÄy\Á8Ç¢q óøâµ«@?]öWþ"¸
Òm%îë½?º•ŠóØJÄy<.‰ó°!çñK÷¥¿â<Œy_"Îã†8ñâ<²•Xœ‡ã QPœÇŽ8SÎŒó¨ÿ)çñt(Îcåçñ8+’qÏeâ<>>;ÎãË£>m÷/Ú¾$Î㔈qs‘8†8ÉÄ‹óÈ¥â<
â<&òÆyÄyL„¯a‡JîW‚ôôAúP ÒýJž>H*Aº_ ÒÓçŒëðçñ¦“_OœÇÚç|ÙËëŸÖçQÍG^&‹Ð8Â1Ñ:°¡8ë¦y
œÇjqýƒã<©¯ŽóÈê­ÿÀ.çqœ.r­Ò]$çñ‘TœÇGãR&}-|¹÷3>)œBœÇåX¦ç!1âJ—ôþšü¥dÇŠ8Ôéã<Â/â0À'2/#â<.q=º¤7Äytè’~‰æâéƒt¤§Óé—éHO§!Ò/Ò‘žNC¤_¤#=†H¿HGz:
‘>{jÆÏº›·mñˆóȜ߱ý%(ÎãÝÐm—ÖSöÞvžk§ Σ1Yåâ¶_úÄyØê¾én¾²ýÅç±¶¬Ó×ö9â<¬ÃùÚ¹€ÙÑÁÅ+•žnœGðÑ|©8ùÕŸ÷NœÇiÉÕÏpa.ÛP ÒýJž>H*Aº_ ÒÓéC%H÷+Azú }¨é~%HO¤• ý%O\qeçñ$¬[Ë÷ýмÿ¼¿HÁ_§Çyt_çaA2ÎãÆ<º]‹Äy<“ˆóxË<%ÎÊxœÇï„â<~#çñkâT‚t¿¤§Ò‡JîW‚ôôAúPɵJ'Îã¤äê¥ç‹ÐŠ‘€â<Ò§6…3ÎÊGœGÔ0,ÎÃÍÒ籎Š8Ìáç1ëç10°ÂçQGsœì®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºB®¤+é
AºBþçL™@ùE¯‘%tEXtdate:create2012-04-05T01:46:01+00:00>—O%tEXtdate:modify2012-04-05T01:46:01+00:00pc/óIEND®B`‚
)

How can I display this image in a regular webpage?

THANK YOU

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:07:33+00:00Added an answer on June 4, 2026 at 1:07 pm

    The characters was the image in a binary data format.

    To display this data as image I did the following:

    I saved the characters in a file (used notepad++ text editor) and I saved the file with a .png extension.

    $imgfile = $_SERVER['DOCUMENT_ROOT']."/images/charts/".$_GET['documentId'].".png";
    $imglink = "http://domain.com/images/charts/".$_GET['documentId'].".png";
    $imgfilehandle = fopen($imgfile, 'w') or die('COULD NOT OPEN FILE: '.$imgfile);
    fwrite($imgfilehandle, $result['body']);
    fclose($imgfilehandle);
    

    then in the body of the html document I displayed the image through this code

        function data_uri($imgfile, $mime) {
    
        $contents = file_get_contents($imgfile);
        $base64 = base64_encode($contents);
        return "data:$mime;base64,$base64";
    
        }
    
    <img id="thischart" class="chart" style="margin: 0 auto; min-height: 1px; min-width: 1px; position: relative; " src="<?php echo data_uri($imgfile, 'image/png');?>" />
    

    voila…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got this image: I want to code this image (just the bar, not
I've got some image processing code in C++ which calculates gradients and finds straight
I got a image like below with padding-right: 15px <td><img style=padding:0px 15px 0px 0px;...
I've got an image that's allowed to be rotated and scaled by the user.
I'm facing a problem of algorithm. Here's the thing : I've got an image
Alright.. I'm struggling with this one.. I've got an image with a transparent hole
I´ve got a star image as <img> . This image has a javascript function,
I got this SVG image from Wikipedia and embedded it into a website using
I'm trying to build the simple layout that I have got in the image
I got this Base64 gif image: R0lGODlhDAAMALMBAP8AAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAACH5BAUKAAEALAAAAAAMAAwAQAQZMMhJK7iY4p3nlZ8XgmNlnibXdVqolmhcRQA7 Now I want to display this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.