473,327 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

IIS fsockopen

hi!

my code here accesses an IIS server and returns

HTTP/1.1 400 Bad Request Server: Microsoft-IIS/5.0 Date: Fri, 16 Apr 2004
10:36:56 GMT Content-Type: text/html Content-Length: 87 The parameter is
incorrect.

what am i doing wrong? does anyone know what a valid http post header for
IIS would look like?
thnx,
tom

<?php
$fp = fsockopen("www.suedtirol.info", 80, $errno, $errstr, 30);
if (!$fp)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$out = "HEAD /XmlApi/Demo/SeekEngine.Get http/1.0\r\n";
$out .= "Host: www.suedtirol.info\r\n";
$out .= "Connection: Close\r\n\r\n";

fputs($fp, $out);
while (!feof($fp))
{
echo fgets($fp, 128);
}
fclose($fp);
}

//php fsockopen IIS error
?>
Jul 17 '05 #1
1 3469
i forgot to say that the very same script works on my own apache web
server...
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris | last post by:
Hi All, I've been puzzling over this, but can't find a satisfactory answer anywhere. I'm not sure if the problem is in my code, or if it's something to do with the PHP/Apache set-up (probably...
2
by: Loopy | last post by:
I'm trying to write a script that will connect to an external site so that I can get access referer information in a database on another one of my sites. I got errors, so I tried to write a script...
9
by: fipaj1992 | last post by:
Hi! I have very big problem with fsockopen() function. It is very important... That's code: <?php $test = fsockopen ('chrome.pl', '8080'); ?>
6
by: murd | last post by:
Hi, I am trying to complete a post using fsockopen but I'm getting the following error: "Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? I am...
1
by: Syl | last post by:
Hi group - I have a database table with 4 columns that hold a url. I am selecting each url and I need to check to see if it is valid. I assumed I could use the fsockopen command. I've had to...
8
by: Yoko | last post by:
So I am using php version 4.3.9 and lets say i have a file on the server called tester.php so i am using fsockopen to point to that file but it gives me a error below. $fh =...
4
by: keychain | last post by:
I'm experience the infamous "SSL: Fatal Protocol Error" bug with Apache 2.x According the fopen() documentation: "If you are using fsockopen() to create an ssl:// socket, you are responsible...
6
by: henryrhenryr | last post by:
Hi I'm really hoping for some ideas! I have been setting up phpmailer on my server and it was working nicely on my local server so I uploaded to my live server and tested. The mystery is that...
0
by: smokenlinks | last post by:
I am working on a script and i get this error Warning: fsockopen() : unable to connect to https://www.alertpay.com:443 (Unable to find the socket transport "https" - did you forget to enable it...
5
by: aswathip | last post by:
I am new to sockets and fsockopen(). I am trying to send SMS using a gateway. But the fsockopen always shows the following error. Warning: fsockopen() : unable to connect to alertbox.in:80 (A...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.