
phamhoangthi
Active Members-
Posts
20 -
Joined
-
Last visited
phamhoangthi's Achievements

Seeker (1/7)
0
Reputation
-
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
RespondBody then that works perfectly, but a question, why difference between ResponseBody and ResponseText, both return html from source website? Anyway Thank you all for everything. Nice day. -
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
Yes, Here I have 2 files, source and result, I send POST request to source file (on my localhost) and receive respond as result file. There is only one paragraph in each file. result.html source.html -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
I am sorry that I can't touch to the server side. There is no way else? Update: thank you for your answer, it's probably the cause of the problem. If I post directly to an online website, the result, as far as jchd said, is already in Utf8, no need any converting funtion, it shows well. But If I download the page (saving from browser) and put to localhost, the problem starts happening. -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
I can't find new version while the latest version is still in 20-9-2015 Do you have any solutions for my problem about receiving respond from POST request? -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
yeah, I use a Php class to do that, (curl) Of course this is only an example that I won't stop at method process() but anyway this method will return the source of the page after sending POST request. Example: The search result. class test{ private $ch; private $page; private $name; private $domain; private $parse; function __construct($var, $studentid){ //declare the curl $parse= parse_url($var); //parse_url $param = array( 'var1'=> '123456', 'var2' => '654321'); $this->domain = $parse['host']; $this->ch = curl_init($var); curl_setopt($this->ch, CURLOPT_RETURNTRANSFER,true); curl_setopt($this->ch, CURLOPT_POST, count($param)); curl_setopt($this->ch,CURLOPT_POSTFIELDS, $param); } function process(){ //exec the curl return $this->page = curl_exec($this->ch); //This variable is result from POST METHOD, and Ofcourse I just need to set a Meta charset html tag to display to browser. No need converting. curl_close($this->ch); //close curl } } $test = new test('http://link.com',$_REQUEST['input']); //Start 'curling' $test->process(); There's no need to StringReplace or regexp anything. so how to fix the problem? -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
Yeah! I view the output by using Notepad++, Chrome browser, same result. And now I have to use Stringreplace or regurlar expression or something like that to fix some error characters? I don't think this is a good idea, why I can't receive the respond from a server as Utf8? Why in Php, The result always looks good? I am still new in this and I have many questions to answer. -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
My first line, "Ä�ã Ä�ến thư viá»�n" is not only like this in SciTE editor consolewrite but also in output.html file. I'm sorry that nothing is new, With BinaryToString($UTF8, 4)in html output file, I see this: "Cảm ơn bạn �?ã �?ến thư vi�?n, hẹn gặp bạn lần sau!" meaning: "Thank you for coming to library, see next time!" "Cảm ơn bạn and hẹn gặp bạn lần sau! " is great, but not "�?ã �?ến thư vi�?n," I think those codes can't convert these characters: "Đ, ệ etc..." -
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
Yes, I did see your notice and I just didn't understand why. This is my simple example, these written both in a file and in the console $TEXT = _StrToUtf8("Ä�ã Ä�ến thư viá»�n") ;This is result of POST method from a webpage. This originally is: "đã đến thư viện" that I can read in my language. Func _StrToUtf8($s) Return BinaryToString(StringToBinary($s, 1), 4) EndFunc ConsoleWrite($TEXT) FileDelete("Google.html") FileWriteLine("Google.html",$TEXT) Console: Output file: �?ã �?ến thư vi�?n -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
Sorry, My SciTE editor can't display unicode anymore after adding code.page=65001, it shows: "s? di?n tho?i" instead of "số điện thoại" and I don't know how to use UTF16 string. I am originally a web coding and I am still new at this... In html document, I just need to put a <meta charset='utf8' to solve my problem -
[resolved] Charset problem with POST method
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
Thanks for helping. I tried to convert my text to ANSI, and then, UTF8, But "số điện thoại" became "S��? �?i��?n thoại" after converting -
phamhoangthi reacted to a post in a topic: [resolved] Charset problem with POST method
-
Hello, everybody, I want to use Post method, something like Curl in Php, to post the data to the server and then, receive the respond to do something. But the respond is not in Charset utf-8, so I can't read it. Here is my code (after seeing some example sample codes): func POST($URL, $DATA) Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $URL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.SetRequestHeader("Accept-Charset", "UTF-8,*") $oHTTP.Send($Data) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> 200) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) //Resolved: Change this to ResponseBody and everything's ok EndFunc Global $TEXT = POST("http://mylink.com/ba.php","var1=13567567290") FileWriteLine("result.html",$TEXT) and the result file, I can't read anything. How can I get passed it? Please help me.
-
Error getElementByName
phamhoangthi replied to phamhoangthi's topic in AutoIt General Help and Support
But Some website have many names of Elements, so how to know where is my names of Elements that i need? I have tried to change value of Item (0) but it didn't work This is one, http://community.mybb.com/member.php?action=login I cannot login this getElementsByName("Passwd").Item(0).value=$password -
phamhoangthi reacted to a post in a topic: Error getElementByName
-
This is a Simply code to login into Google account. $username = InputBox("Message","Type Acc") $password = InputBox("Message","Type Pass") $oIE = ObjCreate("InternetExplorer.Application") ; $oIE.visible = True ; show ie $oIE.Navigate("https://accounts.google.com/ServiceLogin?hl=en&continue=http://www.google.com.vn/") Sleep(10000) $oIE.document.getElementById("Email").value=$username ; input acc $oIE.document.getElementByName("Passwd").value=$password ; Input pass $oIE.document.getElementById("signIn").click ; click button Login and $oIE.document.getElementByName("Passwd").value=$password ; Input pass didnt work. is this a bug ? Please help me.
-
phamhoangthi reacted to a post in a topic: CounterStrike Source AimBot Script
-
Yes, it is ) this topic has just been excavated
-
I want to create a small software to check mail of multi-account yahoo-mail. I mean login many accounts in m.yahoo.com in IE (each accounts is logged on a tab made by GUI). So what should i do ? I am new here and hope you help me. Thanks