Guest Posted November 22, 2006 Share Posted November 22, 2006 Hi, I've been trying to initiate a script on a remote server from a local server with something similar to this code:[code] fsockopen('http://www.xxx.com/folder/script.php?query=string&info=241');[/code]I'm not looking to actually retrieve anything from the source, I just want it to run once while the current page is loading.Is there a better way of doing this? Or am I simply not using it correctly?Thanks in advance!-Henrik Link to comment https://forums.phpfreaks.com/topic/28046-fsockopen/ Share on other sites More sharing options...
hitman6003 Posted November 22, 2006 Share Posted November 22, 2006 Why are you only opening a socket to a different web page and not doing anything with it?[quote]is there a better way of doing this?[/quote]Yes, use fopen, file, file_get_contents, etc.[quote]Or am I simply not using it correctly?[/quote]Yes, and no. http://www.php.net/fsockopen. Specifically the variable that is passed to the function that returns error messages. Link to comment https://forums.phpfreaks.com/topic/28046-fsockopen/#findComment-128313 Share on other sites More sharing options...
Guest Posted November 22, 2006 Share Posted November 22, 2006 Hmm, then more accurately, how would I POST some variables from the local server onto the remote using fsockopen? I can't seem to find a way to do so that'll work on all webservers. Link to comment https://forums.phpfreaks.com/topic/28046-fsockopen/#findComment-128350 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.