Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I send php code through VFP
Message
 
To
13/05/2011 22:31:57
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01510625
Message ID:
01510689
Views:
57
James,
please note that I said to send the code via FTP, not HTTP. There is a lot of security that needs to be in place before running that code also. I was just saying that it can be done and is the best and fastest way I have found yet. My system relies on the PHP code already being on the server and in a secure folder. The data update/extract are then uploaded via HTTP POST.

John.


>Sending php code to a server over http could be very dangerous and sometimes would work at all. Look at the following line of code used as an example on this post.
>
>        'content' => base64_encode(file_get_contents('product.jpg')),
>
>that line is encoding the contents of a jpg file that more than likely does not exist on the server. How could that ever work. Based on the example code, this is using a SOAP web service and needs to be handled as a SOAP service through VFP.
>
>
>>>Okay since the other threads went nowhere, NEW IDEA.
>>>
>>>Is it possible (and how)to send php code to a webserver through VFP? And i guess I should alsop ask about passing variable data through that as well.
>>
>>If you are or learn to be proficient in PHP (not that hard for a programmer) then the answer is yes, you can send PHP with VFP. The trick is to have a PHP program on the server than can receive the code and act on it. This is how I run my web sites. I use VFP 9 TEXT ... ENDTEXT to create the PHP code then FTP it to the server then execute it on the server. It executes far faster than any other method I have tried and allows you to update many MySQL records with one command. On the down side, it takes a while to create the infrastructure (took me about six months) but once you have both ends working the rest is a snap.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform