• marc_____
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies

On my previous post hemm helped me out with his tutorial that hid the oid value.  Which could be found here;

http://sfdc.arrowpointe.com/2007/05/24/fight-web-to-lead-spam-w-akismet/

 

Now I am trying to use Google Adwords with Salesforce and need to hide the sfga value. 

 

How can I keep the sfga value on the server-side and invoke the __sfga() as Salesforce.com recommends?

 

Thanks.

How can I have PHP send data from a web form to salesforce.com?  I am trying to ultimately have the user fill out the form, hit the submit button, validate the form then send the data to salesforce.com (if the form is valid) without refreshing the page.  I am using cURL to do the PHP work. 

 

The code below is in isolation.  This should work by itself, correct?

* the 'oid' value is fake.

 

Code:
<?php
 $data = array(
  'first_name'=> 'Marc',
  'last_name' => 'Kass',
  'email'  => 'marckass@example.com',
  'submit' => 'true',
  'oid'  => '11X011111111xX1'
 );
  
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, "http://www.salesforce.com/servlet/servlet.WebToLead–encoding=ISO-8859-1");
 curl_setopt($ch, CURLOPT_POST, 1 );
  
   
 curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 $postResult = curl_exec($ch);
 
 curl_close($ch);
?>


Any comments?
Any suggestions?

thanks

How can I have PHP send data from a web form to salesforce.com?  I am trying to ultimately have the user fill out the form, hit the submit button, validate the form then send the data to salesforce.com (if the form is valid) without refreshing the page.  I am using cURL to do the PHP work. 

 

The code below is in isolation.  This should work by itself, correct?

* the 'oid' value is fake.

 

Code:
<?php
 $data = array(
  'first_name'=> 'Marc',
  'last_name' => 'Kass',
  'email'  => 'marckass@example.com',
  'submit' => 'true',
  'oid'  => '11X011111111xX1'
 );
  
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, "http://www.salesforce.com/servlet/servlet.WebToLead–encoding=ISO-8859-1");
 curl_setopt($ch, CURLOPT_POST, 1 );
  
   
 curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 $postResult = curl_exec($ch);
 
 curl_close($ch);
?>


Any comments?
Any suggestions?

thanks

Hi!

I am trying to access the PHP samples provides at sforce.com. I have installed all required PEAR modules, at least I think so.

However, when I try to log in I get the following error message:
Error: CURL Extension is required for HTTPS

I am using PHP 4.3.10 on Linux RedHat 9.

Is there a PEAR module missing, is this a firewall issue or what?

Message Edited by Sverre on 01-05-2005 06:17 AM

  • January 05, 2005
  • Like
  • 0