Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 175
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 171
Total: 171

Author Topic: fsockopen enabled in PHP  (Read 22439 times)

0 Members and 1 Guest are viewing this topic.

Offline Wonga

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • PigeonTalk
fsockopen enabled in PHP
« on: September 03, 2007, 07:32:40 pm »
Looks good... Now I'm not a total geek so can someone tell me how I know if my site has

fsockopen enabled in PHP

As this is one of the requirements.. Where do I go to look for it?

Thanks

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: fsockopen enabled in PHP
« Reply #1 on: September 03, 2007, 07:47:31 pm »
Try this php script.
Code: [Select]
<?php
$fp 
fsockopen("www.google.com"80$errno$errstr30);
if (!
$fp) {
    echo 
"$errstr ($errno)<br />\n";
} else {
    
$out "GET / HTTP/1.1\r\n";
    
$out .= "Host: www.example.com\r\n";
    
$out .= "Connection: Close\r\n\r\n";

    
fwrite($fp$out);
    while (!
feof($fp)) {
        echo 
fgets($fp128);
    }
    
fclose($fp);
}
?>

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: fsockopen enabled in PHP
« Reply #2 on: September 03, 2007, 10:29:25 pm »
Wonga,

I could not get that script to work and from what I have read it maybe because I have shared hosting.

Quote
fsockopen enabled in PHP (Required for paid listing, and listing upgrades)

All my classifieds are going to be free so it does not look like this will be a problem for me at this time.

Just to let you know everything else with SMF Classifieds seems to work for me even though I do not seem to have fsockopen enabled in PHP.

I would guess if I tried to start charging for the listings I would have trouble with it and paypal, not sure.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: fsockopen enabled in PHP
« Reply #3 on: September 03, 2007, 10:40:04 pm »
Correct it only is an issue if you would use paid listing and upgrades.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ApplianceJunk

  • Sr. Member
  • ****
  • Posts: 432
    • View Profile
    • ApplianceJunk.com
Re: fsockopen enabled in PHP
« Reply #4 on: September 03, 2007, 10:49:58 pm »
Once I start running personal classifieds were lonely old Maytag men can met sexy hot young chicks then I will have to upgrade to a dedicated server that has fsockopen enabled in PHP so I can start to charge, lol...

Just kidding of coarse. :)

Quote
Correct it only is an issue if you would use paid listing and upgrades.

In fact could you still use the upgrade if you charge $0.00 for them too.
It would be kind of pointless to have upgrade if everyone and anyone could use them, but I would think they would still work.

Offline Wonga

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • PigeonTalk
Re: fsockopen enabled in PHP
« Reply #5 on: September 03, 2007, 10:54:21 pm »
Try this php script.
Code: [Select]
<?php
$fp 
fsockopen("www.google.com"80$errno$errstr30);
if (!
$fp) {
    echo 
"$errstr ($errno)<br />\n";
} else {
    
$out "GET / HTTP/1.1\r\n";
    
$out .= "Host: www.example.com\r\n";
    
$out .= "Connection: Close\r\n\r\n";

    
fwrite($fp$out);
    while (!
feof($fp)) {
        echo 
fgets($fp128);
    }
    
fclose($fp);
}
?>


Ok.. SMFHacks,

What sort of response would I get with that script?

Does it say it is working?... will it be obvious to me when I run it what is happening?

Sorry for the silly questions but when you don't know.... you know how it is...  ;)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: fsockopen enabled in PHP
« Reply #6 on: September 03, 2007, 11:01:23 pm »
This is what I see on my site.
http://smfpro.com/a.php
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Wonga

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • PigeonTalk
Re: fsockopen enabled in PHP
« Reply #7 on: September 03, 2007, 11:20:56 pm »
Thanks SMFHacks,

when i click on your example I get the same as when I did on mine.. attached is the image of it..

That's what's throwing me cause it looks wrong....


Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: fsockopen enabled in PHP
« Reply #8 on: September 04, 2007, 12:00:33 am »
That means that fsockopen is enabled on your webhosting.

The example just fetchs google.com using fsockopen.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Wonga

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • PigeonTalk
Re: fsockopen enabled in PHP
« Reply #9 on: September 04, 2007, 12:16:09 am »
Thanks everyone.... I have purchased and installed great  :D

Offline phyllismm

  • Member
  • *
  • Posts: 2
    • View Profile
Re: fsockopen enabled in PHP
« Reply #10 on: November 29, 2008, 07:13:23 am »
Looks good... Now I'm not a total geek so can someone tell me how I know if my site has

fsockopen enabled in PHP

As this is one of the requirements.. Where do I go to look for it?

Thanks
:)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16452
    • View Profile
Re: fsockopen enabled in PHP
« Reply #11 on: November 29, 2008, 10:10:36 am »
Create a sample php script like this and run and if you do not get an error then you are ok
http://www.smfhacks.com/index.php/topic,885.msg5342.html#msg5342
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
15 Replies
17903 Views
Last post September 14, 2007, 10:37:20 pm
by SMFHacks
fsockopen

Started by Bluto Support

4 Replies
6730 Views
Last post September 01, 2008, 06:41:58 am
by Bluto
1 Replies
4897 Views
Last post April 11, 2009, 08:23:07 am
by SMFHacks
1 Replies
2990 Views
Last post July 03, 2011, 04:40:17 pm
by SMFHacks
2 Replies
4161 Views
Last post October 03, 2015, 12:10:20 pm
by davejo

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

Powered by EzPortal