OpenEMM Support Forum Index OpenEMM Support
Use this forum to get and provide free help regarding OpenEMM
 
 TOP   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Subscription via php-script and opt-in-ip

 
Post new topic   Reply to topic    OpenEMM Support Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
jogr



Joined: 01 Oct 2009
Posts: 1

PostPosted: Thu Oct 01, 2009 1:16 pm    Post subject: Subscription via php-script and opt-in-ip Reply with quote

Hi out there,

I've written a php script to register a user for a newsletter.
Code:
$fp = fsockopen("openEMM-server.tld", 8080, $errno, $errstr, 30);
      if (!$fp) {
          echo "$errstr ($errno)<br />\n";
      } else {
          $out = "POST /form.do HTTP/1.1\r\n";
          $out .= "Host: www.script-server.tld \r\n";
          $out .= "Referer: " . $_SERVER["REMOTE_ADDR"] . "\r\n";
          $out .= "Content-type: application/x-www-form-urlencoded\r\n";
          $out .= "Content-length: ". strlen($data_to_send) ."\r\n";
          $out .= "Connection: Close\r\n\r\n";
          $out .= $data_to_send;
          fwrite($fp, $out);

where $data_to_send contains the data to add the interested user in openemm.

This script works fine accept one thing. Checking the new user via Recipients overview I noticed that the opt-in-ip contains the ip of www.script-server.tld.
Is there a chance to change it to the users opt-in ip (which will be given in $_SERVER["REMOTE_ADDR"])

Thanks for help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenEMM Support Forum Index -> Suggestions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group