smuck Posted July 4, 2008 Share Posted July 4, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.