Note that there are some explanatory texts on larger screens.

plurals
  1. POphp, the HTTP_REFERER not found
    primarykey
    data
    text
    <p>Hi im trying to connect to integrate my form to a payment provider but im getting URL not allowed and it turns out that the HTTP_REFERER is not found..</p> <pre><code>#the following function performs a HTTP Post and returns the whole response function pullpage( $host, $usepath, $postdata = "" ) { # open socket to filehandle(epdq encryption cgi) $fp = fsockopen( $host, 80, &amp;$errno, &amp;$errstr, 60 ); #check that the socket has been opened successfully if( !$fp ) { print "$errstr ($errno)&lt;br&gt;\n"; } else { #write the data to the encryption cgi fputs( $fp, "POST $usepath HTTP/1.0\n"); $strlength = strlen( $postdata ); fputs( $fp, "Content-type: application/x-www-form-urlencoded\n" ); fputs( $fp, "Content-length: ".$strlength."\n\n" ); fputs( $fp, $postdata."\n\n" ); #clear the response data $output = ""; #read the response from the remote cgi #while content exists, keep retrieving document in 1K chunks while( !feof( $fp ) ) { $output .= fgets( $fp, 1024); } #close the socket connection fclose( $fp); } #return the response return $output; } #define the remote cgi in readiness to call pullpage function $server="secure2.epdq.co.uk"; $url="/cgi-bin/CcxBarclaysEpdqEncTool.e"; #the following parameters have been obtained earlier in the merchant's webstore #clientid, passphrase, oid, currencycode, total $params="clientid=xxx"; $params.="&amp;password=xxxx"; $params.="&amp;oid=xxxx"; $params.="&amp;chargetype=Auth"; $params.="&amp;currencycode=826"; $params.="&amp;total=120"; #perform the HTTP Post $response = pullpage( $server,$url,$params ); #split the response into separate lines $response_lines=explode("\n",$response); #for each line in the response check for the presence of the string 'epdqdata' #this line contains the encrypted string $response_line_count=count($response_lines); for ($i=0;$i&lt;$response_line_count;$i++){ if (preg_match('/epdqdata/',$response_lines[$i])){ $strEPDQ=$response_lines[$i]; } } &lt;FORM action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="POST"&gt; &lt;?php print "$strEPDQ"; ?&gt; &lt;INPUT type="hidden" name="returnurl" value="http://www.xxxxxx.co.uk/test/confirm.php"&gt; &lt;INPUT type="hidden" name="merchantdisplayname" value="xx xxx"&gt; &lt;INPUT type=hidden name=baddr1 value="address line 1"&gt; &lt;INPUT type=hidden name=baddr2 value="address line 2"&gt; &lt;INPUT type=hidden name=baddr3 value="address line 3"&gt; &lt;INPUT type=hidden name=bcity value="City"&gt; &lt;INPUT type=hidden name=bcountyprovince value="County"&gt; &lt;INPUT type=hidden name=bpostalcode value="Postcode"&gt; &lt;INPUT type=hidden name=bcountry value="GB"&gt; &lt;INPUT type=hidden name=btelephonenumber value="01111 012345"&gt; &lt;INPUT type=hidden name=email value="xxxxx"&gt; &lt;INPUT type=hidden name=saddr1 value="Address line 1"&gt; &lt;INPUT type=hidden name=saddr2 value="Address line 2"&gt; &lt;INPUT type=hidden name=saddr3 value="Address line 3"&gt; &lt;INPUT type=hidden name=scity value="City"&gt; &lt;INPUT type=hidden name=scountyprovince value="County"&gt; &lt;INPUT type=hidden name=spostalcode value="Postcode"&gt; &lt;INPUT type=hidden name=scountry value="GB"&gt; &lt;INPUT type=hidden name=stelephonenumber value="01111 012345"&gt; &lt;INPUT TYPE="submit" VALUE="purchase"&gt; &lt;/FORM&gt; </code></pre> <p>can anyone help?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload