[Solved] fp web and get method... how? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cpalx · 2012-12-30 16:36 Hello, how can i use Get method using Fpweb, i dont find and example. thanks ---------------------------------------------------------------------- otorres · 2012-12-30 16:42 Hello, in my pc the path of examples is: C:\lazarus\fpc\2.6.1\source\packages\fcl-web\examples\ Regards. ---------------------------------------------------------------------- cpalx · 2012-12-30 16:48 yes i have here /usr/share/fpcsrc/2.6.0/packages/fcl-web/examples but i dont find a get method example ---------------------------------------------------------------------- otorres · 2012-12-30 16:50 httpclient\httpget.lpi Regards. ---------------------------------------------------------------------- cpalx · 2012-12-30 17:09 thanks. I found it but i cannot make it work. Always display in web ========= Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. ========= and in log (apache2), shows ========= httpget HTTP/1.1" 500 635 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0" ========= any idea? ---------------------------------------------------------------------- otorres · 2012-12-30 17:26 Try executing you program with this params: "http://www.cuantogato.com/ultimos/p/4" "A real path\Get.html"No try with https. ---------------------------------------------------------------------- cpalx · 2012-12-30 17:29 i tried but same. the pucblic link is http://d.stsoft.pe/~cortiz/cgi-bin/httpget/ultimos/p/4 where httpget is the cgi example ---------------------------------------------------------------------- otorres · 2012-12-30 17:34 httpget is a executable application, you can debug with F9 and execution params put the url and file path full to get. ---------------------------------------------------------------------- cpalx · 2012-12-30 17:36 @otorres i dont think so, a cgi is an executable, but runs in the web, Lazarus cannot debugger ---------------------------------------------------------------------- otorres · 2012-12-30 17:40 but httpget not is a CGI, a CGI Project use a unit fpCGI, httpget is a command line program. ---------------------------------------------------------------------- cpalx · 2012-12-30 17:46 but to execute must be on web server ---------------------------------------------------------------------- otorres · 2012-12-30 17:48 no exactly, is only a example to use Get metod with a url and save it to a local file, you can create a CGI and implement this code, but i think ParamStr(index) no works in a CGI, need use QueryString. ---------------------------------------------------------------------- cpalx · 2012-12-30 18:04 works with this ARequest.QueryFields.Values[ 'GetVarName' ]; change the "a" value (a=7 or a=15 ,...) http://d.stsoft.pe/~cortiz/cgi-bin/busqueda?a=7 ---------------------------------------------------------------------- Leledumbo · 2012-12-30 20:15 I'm a bit confused with your initial question whether to create a http client that does GET method (as httpget example does) or to create a http server that can be queried via GET method. Whichever you mean, I guess you've found the folder to look for examples. ---------------------------------------------------------------------- cpalx · 2012-12-30 22:12 i needed use get method. the httpclient didnt solve the problem, ---------------------------------------------------------------------- Leledumbo · 2012-12-30 22:49 Quote needed use get methodPlease see the bold words in my comment above, which one do you expect? ---------------------------------------------------------------------- cpalx · 2012-12-31 02:58 i needed a client that does a get method. the example httpget didnt work for me. So i made a cgi application and i used ARequest.QueryFields.Values[ 'GetVarName' ]; to get the value. ---------------------------------------------------------------------- Leledumbo · 2012-12-31 07:52 QuoteSo i made a cgi application and i used ARequest.QueryFields.Values[ 'GetVarName' ]; to get the value.Wait, what you're saying is contrasting. You said you need a client, but then you create a cgi application which is a server. If you need a client, the httpget example does exactly what you need.