user code for the google program example

Re: user code for the google program example

by Jan Dierckx -
Number of replies: 0

This approach is meant to sent parameters to another application running on an webserver. This application then returns something to your browser. You can't use this approach to start regular pc programs... if that's what you mean with an exe file.

Now how do you know which parameters to send?

  1. Easiest way is to do a search for Moodle in your favorite search engine. (thus increasing Moodle's page ranking while you're at it wink)

  2. On the results page, look at the location bar of your browser. It says something like this: http://search.yahoo.com/search?p=moodle&sm=Yahoo%21+Search&fr=FP-tab-web-t&toggle=1&cop=&ei=UTF-8

  3. See all the a=xxxx pairs separated by the & sign?

    Take out the p=moodle& part, because that is the part we would like to automatically contain our name.

  4. Paste the resulting incomplete address in the Location: field.

  5. Add one parameter Full name to the parameter list. This will contain the name of the logged in user.

  6. Make it use p as the variable name, because that is what Yahoo uses to pass the search term.

  7. Try it!

  8. Now experiment with other search engines, other parameters (Moodle knows more than just your name), etc...