Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending to PHP scripts
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00769439
Message ID:
00769480
Vues:
19
Hi Arne,

If you need a fairly simple solution the code Anatoliy posted works well.

However, ever you need to address a number of issues related to HTTP (such as timeouts proxies, security, different POST content Types, file uploads etc) it gets to be considerably more complicated but most of these things are required if you end up embedding HTTP support into applications.

You might want to check out West Wind Internet Protocols which among other things (also SMTP/POP3 email, FTP, Sockets and more) includes a wwHTTP class which simplifies access to HTTP content considerably.
oHttp = CREATE("wwHTTP")
oHttp.AddPostKey("SomeKey","someValue")
lcHtml = oHTTP.HttpGet("http://www.somesite.com/somescript.php?Parameter=Value")
For more info you can check out:

http://www.west-wind.com/wwIPStuff.asp

+++ Rick ---


>Hi all,
>
>I'm hoping someone can tell me how to do this simply from VFP6. What I'd like to do is send an HTTP request to a PHP or Perl script from VFP. Basically, I DO NOT need to get anything back from the web-server via HTTP but simply post some data to a PHP or Perl script. In a web browser, an example might be:
>
>http://www.somesite.com/somescript.php?Parameter=Value
>
>Anyone know of a simple way to do this? Reliability of the connection (i.e. wether or not the post was successful) is not a great concern here because the PHP or Perl script will essentially take "Parameter" and do something with it, and then place a flag in a database that the VFP script is polling (in other words, this is to work with an existing app from VFP).
>
>Any help would be much appreciated!
>
>-Arne
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform