New topic: 

httpsocket

<http://forums.realsoftware.com/viewtopic.php?t=46996>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        ivanomonti          Post subject: httpsocketPosted: Tue Feb 19, 
2013 9:28 am                         
Joined: Mon Nov 03, 2008 6:36 am
Posts: 474
Location: Italia > Milano > Solaro                Hi, all forum 

Italiano

invio una stringa ad una pagina php, scenari 2

1) invio direttamente la stringa con browser e tutto va bene
2) la invio da httpsocket e non va a buon fine ...

non so dove sbaglio, avendo usato ogni tipo di codifica o altro nulla di fatto, 
cosa strana e che se invio una select tutto questo non succede, se invio insert 
mi viene fuori il problema.

English

sending a string to a php page, scenarios 2

1) send the string directly with browser and all is well
2) the sending by httpsocket and not unsuccessful ...

I do not know where I'm wrong, having used any type of encryption or other 
nothing, strange thing is that if I send a select all this does not happen, if 
I insert is sending out the problem.


string select ok = http://www.ivanomonti.eu/Powershopping_ ... Jlcm8uaXQ=

string insert error into soket http://www.ivanomonti.eu/Powershopping_ ... 
RgKSBWQUxV
RVMgKCdDYXRlZ29yeScsJ3Byb2R1Y3Rpb24nLCdhWFpoYm05dGIyNTBhVUJzYVdKbGNtOHVhWFE9
Jyk=&key=aXZhbm9tb250aUBsaWJlcm8uaXQ=

Perfect send string firefox, safari, IE, crome 


dim obj as JSONItem
dim sk as new HTTPSocket
self.Listbox1.DeleteAllRows

dim query as String = ConvertEncoding( TextField_site.Text + 
TextField_api.Text+"?query="+ EncodeBase64(TextArea_query.Text) 
+"&key="+TextField_key.Text , Encodings.ISOLatin1)

self.TextArea_query.Text = ConvertEncoding(query, Encodings.ISOLatin1)

dim s as String = sk.Get(query,5)

ProgressBar1.Maximum = 100
ProgressBar1.Value = 0
ProgressBar1.Refresh

if s = "insert ok" then
  MsgBox s
  return
elseif s = "update ok" then
  MsgBox s
  return
elseif s = "delete ok" then
  MsgBox s
  return
elseif Left(s,18) = "Error code string:" or left(s,6) = "<br />" then
  MsgBox s
  return
elseif s = "No records found" then
  MsgBox s
  return
elseif s = "key invalid" then
  MsgBox s
  return
elseif s = "" then
  MsgBox "Errore sconosciuto..."
  return
end if

obj = new JSONItem(s)

ProgressBar1.Maximum = obj.Count-1

for i as integer = 0 to obj.Count-1
  ProgressBar1.Value = i
  ProgressBar1.Refresh
  if obj.IsArray then
  listbox1.AddRow cstr(i)
  for j as integer = 0 to obj.Child(i).Count-1
  listbox1.Cell(listbox1.LastIndex,j+1) = 
obj.Child(i).Value(obj.Child(i).Name(j)).StringValue
  next
  else
  dim key as String = obj.Name(i)
  if obj.value(key) isa JSONItem then
  listbox1.AddFolder(key)
  listbox1.RowTag(listbox1.LastIndex) = obj.Value(key)
  listbox1.Expanded(listbox1.LastIndex) = true
  else
  listbox1.AddRow(key)
  listbox1.cell(listbox1.lastindex,1) = obj.Value(key)
  end if
  end if
next i

ProgressBar1.Value = 0
ProgressBar1.Refresh
      
_________________
REALStudio
Custom controls and classes for RealStudio ( no plugin )
http://www.ivanomonti.eu  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to