JGWhitelaw |
2007-03-14 08:54:54 |
|
It always comes back and says the number is not correct. The number
passed is correct, as I have echoed it to screen, so it doesn't appear
to picking up the number from your server. Any help would be greatly
appreciated.
http://www.florida-villa.com/2007/florida_villa_owners/ |
|
Did you add the PHP script to login.php file?
If yes, I need to see installation, to help. |
JGWhitelaw |
2007-03-15 06:05:39 |
|
This is what I added:
session_start();
if($_GLOBALS['REQUEST_METHOD'] == 'POST' || count($_POST) > 0) {
$pwf_message = "The image code you have provided does not match the
actual one. Hit the 'back' button of your browser and input the
correct code please.";
if(strlen($_POST['protectwebformcode']) > 30) {
die($pwf_message);
}
$protectwebformresult =
@file_get_contents(
"http://protectwebform.com/verify01?vui=7719&vp=38rtqgd9705s&ri=" .
urlencode($_SERVER['REMOTE_ADDR']) . "&vs=" .
urlencode($_POST['protectwebformcode']));
if(preg_match("|<authorization status=\"0\"|", $protectwebformresult))
{
echo "Warning. You are not authorithed to use image protection
provided by
http://www.protectwebform.com. Read http://www.protectwebform.com
FAQ for more information";
} elseif(!preg_match("|<verification result=\"yes\"/>|",
$protectwebformresult)) {
die($pwf_message);
}
}
|
|
I tried to submit the form, but didn't find request from your site in
log files. Seems that your script does not request the service. May be
you do not have file_get_contents function, or it is forbidden on your
server.
Could you replace
'@file_get_contents' with 'file_get_contents'
to see if warnings occur.
Also you could 'echo' the result:
you could add the line:
echo $protectwebformresult;
before if(preg_match("|<authorization status ...
and submit the form to see if the result xml code appeares on the
page. |
JGWhitelaw |
2007-03-15 06:54:54 |
|
I have done that. the echo statement is not producing anything at
all. |
|
Try to add the following code:
----------------------------------------
function file_get_contents2($url){
$url_parsed = parse_url($url);
$fd = fsockopen($url_parsed[host], 80);
$data = ''; $header = false;
fputs($fd,"GET ".$url_parsed[path]." HTTP/1.0\r\n");
fputs($fd,"Host: ".$url_parsed[host]."\r\n");
fputs($fd,"Connection: close\r\n\r\n");
while($line = fgets($fd)) {
if($header) $data .= $line;
if(strlen($line) <= 2) $header = true;
}
fclose($fd);
return $data;
}
------------------------------------------
And to replace 'file_get_contents' with 'file_get_contents2' in your
script. |
JGWhitelaw |
2007-03-15 08:18:43 |
|
OK, I get the warning now: The XML page cannot be dispalyed........ |
|
Remove the echo statement now.
Remove this line:
echo $protectwebformresult;
Hope, it will work now. |
JGWhitelaw |
2007-03-15 09:16:30 |
|
Now it is saying I am not authorised?? |
|
I tried to correct the code, i provided to you above:
--------------------------------------------
function file_get_contents2($url){
$url_parsed = parse_url($url);
$fd = fsockopen($url_parsed[host], 80);
$data = ''; $header = false;
$reques_url = (strlen($url_parsed[query]) > 0) ?
$url_parsed[path]."?".$url_parsed[query] : $url_parsed[path];
fputs($fd,"GET ".$reques_url." HTTP/1.0\r\n");
fputs($fd,"Host: ".$url_parsed[host]."\r\n");
fputs($fd,"Connection: close\r\n\r\n");
while($line = fgets($fd)) {
if($header) $data .= $line;
if(strlen($line) <= 2) $header = true;
}
fclose($fd);
return $data;
}
--------------------------------------------
|
JGWhitelaw |
2007-03-15 10:31:25 |
|
Fantastic. That works. Thanks. |
PSYKKO |
2007-05-10 09:07:41 |
|
Dear,
can you post the entire code? I'm being crazy!
Thanks of all! |
kosinus |
2007-05-14 04:45:51 |
|
had the same problem, but it works with this solution, tnx. |
revistazo1 |
2007-05-15 14:38:33 |
|
not work I use cutenews script and have this error : The image code
you have provided does not match the actual one. Hit the 'back' button
of your browser and input the correct code please. somebody it know
how resolve it |
cbfans |
2007-06-21 17:43:18 |
|
[quote]not work I use cutenews script and have this error : The image
code
you have provided does not match the actual one. Hit the 'back'
button of your browser and input the correct code please. somebody it
know how resolve it[/quote]
ditto |
wpatters1229 |
2008-08-06 10:13:08 |
|
I just followed this string and did the same things and it now works.
I think the changes need to be standardized into the produced code |
atul4 |
2010-06-01 12:46:28 |
|
The society is facing problems with such laws. This has to go legal
and it’s needed to be sorted at the earlier.
[url=http://furniturepackages.eu]Furniture Packages[/url] |
atul4 |
2010-06-01 12:47:08 |
|
The society is facing problems with such laws. This has to go legal
and it’s needed to be sorted at the earlier.
<a href="http://furniturepackages.eu" rel="dofollow">Furniture
Packages</a> |
atul4 |
2010-06-01 13:07:48 |
|
The above thought is smart and doesn’t require any further
addition.
It’s perfect thought from my side.
<a href="http://furniturepackages.eu" rel="dofollow">Furniture
Packages</a> |
|
PDF Creator is an all-functional PDF maker tool that can create PDF
documents from any
printable files, such as txt, images (JPEG, GIF, PNG, BMP, EMF, EWF,
TIFF), compatible with
Microsoft Office 2003/2007/2010, support converting Word (doc, docx),
PowerPoint (ppt,
pptx), Excel (xls, xlsx) to PDF file.
[url=http://www.oxpdf.com/pdf-creator.html]PDF Creator
[/url] can also save file format as PNG, JPEG, BMP, PCX, TIFF and PS,
EPS under "option"
settings. More advanced pdf software
[url=http://www.oxpdf.com/emf-to-pdf-converter.html]EMF to PDF
Converter[/url]
[url=http://www.oxpdf.com/wmf-to-pdf-converter.html]WMF to PDF
Converter[/url] |
Post Reply:
You must be logged in to reply.
|