Jump to content

fsockopen


Guest

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.