Jump to content

context_create_stream


smuck

Recommended Posts

I am writing php POST rutines to remote URL API and have already succeeded with CURL and fsockopen, so u can send some variables as $_POST variables to an API on a remote server.

The problem occuring is with fopen or file_get_contents, that uses context_create_stream function:

 

Fatal error: Call to undefined function context_create_stream() in ..... on line ...

 

And why that when PHP Version is 5.1.6 and Disabled php functions on this server is : "apache_child_terminate, apache_get_modules, apache_get_version, apache_getenv, apache_note, apache_setenv, dl, error_log, escapeshellcmd, exec, ini_alter, leak, link, mb_send_mail, openlog, passthru, pcntl_exec, pfsockopen, popen, proc_open, readlink, set_time_limit, shell_exec, socket_connect, socket_create, symlink, syslog, system, virtual"

 

I tried 2 different servers...

 

It's the same with http_post_fields function...

 

The idea is to ask the server, whether curl or fopen or fsockopen is enabled and then include functions accordingly. And I got GET rutines working; it's just this POST with fopen that doesn't work....

Link to comment
https://forums.phpfreaks.com/topic/113167-context_create_stream/
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.