How can I call a url using php code ....

for example I want to call the registration page with a given parameter, and return true if the registration is ok or false if not.

Some people saying that the COM Object maybe useful in the Operation.

Can you help me please ?

Thanks.

    You absolutely do NOT need to resort to COM objects for this.

    The [man]fopen[/man] function can usually accept a URL instead of a filename. Then you can [man]fread[/man] the page just as if it were a local file. Better yet, just use [man]file_get_contents[/man]:

    $webpage = file_get_contents("http://www.example.com/somepage.php?signup=bob");

    If you need to simulate a POST form instead of a GET form, the [man]curl[/man] related functions offer more power than fopen (though more complexity too).

      You may be able to code yourself around the problem using include. e.g.

      include("include_file.inc");

      The include_file.inc file will just contain plain old HTML or php or whatever you are including.

        Write a Reply...