RE: [PHP] String Type Unknown

From: Date: Wed, 02 May 2001 10:47:20 +0000
Subject: RE: [PHP] String Type Unknown
Groups: php.general 
Request: Send a blank email to php-general+get-51120@lists.php.net to get a copy of this message
Nathan, Another way to do it (but much less fun): <?php function HexToChar($Txt) { // Read Hex and convert to characters // Rudolf Visagie - 1 May 2001 $Txt = strtoupper($Txt); $NewTxt = ""; for ($i = 0; $i < strlen($Txt); $i+=2) { $CharValue = base_convert(substr($Txt, $i, 2), 16, 10); $NewTxt .= chr($CharValue); } return $NewTxt; } $Txt = "0ffffffac0ffffffed0005737200146a6176612e7574696c2e50726f7065727469657339120 fffff"; $Txt .= "fd07a70363e0ffffff980200014c000864656661756c74737400164c6a6176612f7574696c2 f5072"; $Txt .= "6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffffffbb 0f252"; $Txt .= "14a0ffffffe40ffffffb803000246000a6c6f6164466163746f724900097468726573686f6c 64787"; $Txt .= "3f4000000000000877080000000300000002740005696d61676574004a3c494d47205352433 d226"; $Txt .= "87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e74 75726"; $Txt .= "5732f6c6162732f627269636b735f7765622e6a7067223e7400047465787474020249742069 73206"; $Txt .= "96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c697461 746f7"; $Txt .= "220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e20746865 20766"; $Txt .= "172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d 65206"; $Txt .= "6616d696c6961722077697468207468652070726f6a6563747320616e64206d617465726961 6c732"; $Txt .= "0746861742073747564656e74732077696c6c20626520646f696e672c20616e642062652061 77617"; $Txt .= "265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d73 20616"; $Txt .= "e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c6961726974 79207"; $Txt .= "769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e7473 20697"; $Txt .= "320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f70 65642"; $Txt .= "06120736570617261746520636f7572736520666f637573696e67206f6e2074686520757365 206f6"; $Txt .= "620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e20 20416"; $Txt .= "c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d652074 6f207"; $Txt .= "4616b652074686973206164646974696f6e616c20636f757273652e7870"; ?> <html> <head> <title>Read Hex dump</title> </head> <body> <?echo HexToChar($Txt)?> </body> </html> Rudolf Visagie QEDI -----Original Message----- From: Nathan Cook [mailto:ncook@pcsedu.com] Sent: 01 May 2001 11:16 To: Rudolf Visagie Subject: Re: [PHP] String Type Unknown How were you able to convert that? Thanks! Nathan Cook ncook@pcsedu.com ----- Original Message ----- From: "Rudolf Visagie" <Rudolf@qedi.co.za> To: "Nathan Cook" <ncook@pcsedu.com> Cc: <php-general@lists.php.net> Sent: Tuesday, May 01, 2001 2:53 AM Subject: RE: [PHP] String Type Unknown Hi Nathan, It's a hex dump and it reads: ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $` ¦ÆöDf7F÷$ -F?&W6?öÆG??@ w  t imaget J<IMG SRC="http://mediabank.edventures.com/edventures/labs/bricks_web.jpg">t texttIt is important to emphasize that a facilitator does not need to be an expert in the various subject areas, but should become familiar with the projects and materials that students will be doing, and be aware of how to get help or look up terms and answers. In particular, familiarity with the LEGO<sup>&reg;</sup> elements is highly recommended. PCS has developed a separate course focusing on the use of the LEGO<sup>&reg;</sup> materials. All facilitators should schedule time to take this additional course.xp Rudolf Visagie QEDI -----Original Message----- From: Nathan Cook [mailto:ncook@pcsedu.com] Sent: 30 April 2001 10:31 To: Php List Subject: [PHP] String Type Unknown I have this string: 0ffffffac0ffffffed0005737200146a6176612e7574696c2e50726f7065727469657339120f ffff fd07a70363e0ffffff980200014c000864656661756c74737400164c6a6176612f7574696c2f 5072 6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffffffbb0 f252 14a0ffffffe40ffffffb803000246000a6c6f6164466163746f724900097468726573686f6c6 4787 03f4000000000000877080000000300000002740005696d61676574004a3c494d47205352433 d226 87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747 5726 5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697 3206 96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617 46f7 220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652 0766 172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6 5206 6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616 c732 0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617 7617 265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d732 0616 e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c69617269747 9207 769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e74732 0697 320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f706 5642 06120736570617261746520636f7572736520666f637573696e67206f6e20746865207573652 06f6 620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e202 0416 c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746 f207 4616b652074686973206164646974696f6e616c20636f757273652e7870 And I don't know what type it is. It is it a binary string? Can I convert it to text and if so, how? Thank You, Nathan Cook ncook@pcsedu.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#51120) next »