Questions tagged [fsockopen]

PHP function used to open (Internet or Unix domain) sockets connections.

382 questions
4
votes
2 answers

Upload multiple files and post vars with fsockopen

I want both to send multiple files and post vars in a http request with fsockopen.. Have come up with this code, but I don't know how to send the post vars with the files!? Have uncommented the line where the post data query is build, but don't know…
clarkk
  • 27,151
  • 72
  • 200
  • 340
4
votes
1 answer

Use fsockopen with proxy

I have a simple whois script if($conn = fsockopen ($whois_server, 43)) { fputs($conn, $domain."\r\n"); while(!feof($conn)) { $output .= fgets($conn, 128); } fclose($conn); return $output; …
nacholibre
  • 3,874
  • 3
  • 32
  • 35
3
votes
1 answer

Can I open socket in PHP from a specific IP (if the machine has two IPs)?

I'm using PHPMailer and it uses fsockopen to access the SMTP server. But the machine has two IPs with different reverse DNS records. So in email headers I got the following: Received: from one-server.tld (HELO another-server.tld) ... I need to hide…
Pavel Koryagin
  • 1,479
  • 1
  • 13
  • 27
3
votes
4 answers

PayPal IPN with fsockopen returns NULL

I'm trying to set up the PayPal IPN on my web application, I copied from PayPal's documentation on an example PHP snippet which is found here. However, when I'm testing with the PayPal's sandbox, sending an IPN with the simulator which is found…
MacMac
  • 34,294
  • 55
  • 151
  • 222
3
votes
2 answers

fsockopen() not working on a specific web host?

One of our customers said they have a very simple script which uses fsockopen() to determine whether a server is online or not. They said until recently it worked fine on their website through us, but recently just stopped working, so I am assuming…
user470760
3
votes
3 answers

Does my server's port 8080 have to be open when connecting to a remote 8080 port?

I'm trying to use fsockopen() to connect from my apache server to a remote API server. The remote server script I need to connect to runs on port 8080. The following keeps returning a 101 connection timed out error: $fp =…
Matt1
  • 33
  • 4
3
votes
1 answer

Wordpress autologin using CURL or fsockopen in PHP

Client wants to click a link and auto login to Wordpress backend admin section. I tried using fsockopen, code below. Didn't work. $post_data['user_login'] = 'admin'; $post_data['user_pass'] = 'password'; $post_data['wp-submit'] = 'Log…
mmundiff
  • 3,875
  • 7
  • 32
  • 46
3
votes
2 answers

problem communicating with gmail imap server using fsockopen in php

i m able to communicate using the imap functions in php and also using the openssl from commandline ,i just wanted to try this doing fsockopen() in php. my code is :
karyboy
  • 317
  • 1
  • 5
  • 22
3
votes
3 answers

Unable to establish TLS connection in PHP via fsockopen

I'm trying since a couple of days to establish a TLS connection to a SMTP server in PHP via fsockopen() on my newly installed Ubuntu server. I#ve tried almost everything and googled for hours but still I didn't get it working. The PHP code looks as…
Markus Lanthaler
  • 31
  • 1
  • 1
  • 2
3
votes
2 answers

Enable SSL in PHP fsockopen()

I am using PHP fsockopen() to finalize a payment between my server and PayPal. However, when I try to use an SSL connection, I get this error: Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://:443 (Unable to find the socket…
Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195
3
votes
1 answer

How to use fsockopen (or compatible) with SOCKS proxies in PHP?

I've coded a non-evil, non-spammy IRC bot in PHP, using fsockopen and related functions. It works. However, the problem is that I need to support proxies (preferably SOCKS5, but HTTP is also OK if that is somehow easier, which I doubt). This is not…
user11003203
3
votes
1 answer

Rewriting some code using fsockopen to use curl instead

My host doesn't allow fsockopen, but it does allow curl. I'm happy using curl from the cli, but haven't had to use it with PHP much. How do I write this using curl instead? $xmlrpcReq and Length are defined earlier. $host =…
Rich Bradshaw
  • 71,795
  • 44
  • 182
  • 241
3
votes
1 answer

Get multiple pages with a single fsockopen

Hy all. I need to get the content of multiple pages from a single domain. Now for each page I use an fsockopen connection, and I get the content of the page this way:
Tamás Pap
  • 17,777
  • 15
  • 70
  • 102
3
votes
1 answer

How can I run multiple fsockopen() asynchronously

I am working on a project to validate multiple email Ids using this php class -> php-smtp-email-validation. The code works fine when I input a maximum of 10 email Ids and it takes about 30-40 seconds to give the result. But I want to input thousands…
Anoop Nair
  • 171
  • 1
  • 2
  • 13
1 2
3
25 26