Forum Moderators: coopster

Message Too Old, No Replies

call a php method remotely from localhost

         

sixeleven

1:19 am on Oct 2, 2008 (gmt 0)

10+ Year Member



hi
how i can call a php method remotely from localhost.
this method is simple ,with no entrance value or return type.

i just need to call it .

Anyango

6:38 am on Oct 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it doesn't take anything from the calling script ?
simply put that one method in a new file lets say method.php

then simply load that method.php file from your calling script.

file_get_contents("method.php") // you can use any other function

unless i misunderstood.

vincevincevince

7:48 am on Oct 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



GET http://www.example.com/file.php
wget http://www.example.com/file.php --output-document=/dev/null

Those are two methods I've used in the past

sixeleven

12:14 pm on Oct 3, 2008 (gmt 0)

10+ Year Member



To Anyango :
tanx , i am a newbie to php.
i write a method by php and upload it on my host. this method ,read the content of specific xml file .

i need to call this method ,when someone upload new xml file via ftp on the host.

how i can use this method( file_get_contents("method.php") ).

tanx :)

sixeleven

12:15 pm on Oct 3, 2008 (gmt 0)

10+ Year Member



To vincevincevince :

would you plz , describe it , i am not professional programmer on php.

tax:)