Http library problem

jothis

Active Member
Licensed User
Hi everyone,

I Writed a program with HTTP library i attached the code

My problem is when i post a value to php file example(%cera%)

the value getting in php file is like 'Îra%' i in my view the problem is the % .

This is my php code
PHP:
<?php
   //file_put_contents("test.txt",urldecode($_POST['query']));
   print $_POST['query'];
?>


I want to know how to solve this

Please help me :sign0085:

Jothis
 

Attachments

  • 01.zip
    824 bytes · Views: 223
Last edited:

Basic4Life

Member
Licensed User
The problem is that php is interpreting "%ce" as the url encoded character for Î.

So an easy solution would be to parse your input and encode it.
I don't know any simple way to access the .net encoding from B4PPC but you can do it by hand. You just have to get the ASCII code for the punctuation mark, convert that to Hex and then add a % in front of that number.
Please have a look at the attached example. (I added the Bitwise library for converting Dec to Hex)
 

Attachments

  • 01_2.sbp
    1.9 KB · Views: 250
Top