Buy Sell Discuss UK Domain Names at AcornDomains.co.uk

Today's Drop Dates are: 19-02-2012 or 26-02-2012   All times are GMT. The time now is 12:40:28 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design > Scripts and Coding
Connect with Facebook

Scripts and Coding PHP, MySQL, scripts

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 23-07-2010, 05:07:52 PM     #1 (permalink)

 
Join Date: Aug 2004
Location: Lancs
Posts: 249
chrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond repute

PHP Sockets Help

Hi all,

I'm just rewriting a couple of my PHP scripts and am trying to make use of 'socket_set_option($socket, IPPROTO_TCP,TCP_NODELAY,1)' (set just before socket_create()) for packet management. I'm not the greatest programmer in the world so does anyone have any idea why it doesn't seem to work and why I'm getting these messages:

PHP Notice: Use of undefined constant IPPROTO_TCP - assumed 'IPPROTO_TCP'
PHP Notice: Use of undefined constant TCP_NODELAY - assumed 'TCP_NODELAY'

With the very few examples that I have found, there seems to be nothing wrong with my use of socket_set_option so I just wondered if anyone had any ideas about it?

Thanks!

Chris
__________________
Buyer pays Nominet transfer fees on any domains I sell.
chrisvaughanuk is offline  
Old 23-07-2010, 05:14:33 PM     #2 (permalink)

 
aZooZa's Avatar
 
Join Date: Nov 2005
Posts: 3,980
aZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond reputeaZooZa has a reputation beyond repute

Try this: http://php.net/manual/en/function.fsockopen.php
aZooZa is offline  
Old 23-07-2010, 05:22:51 PM     #3 (permalink)

 
Join Date: Aug 2004
Location: Lancs
Posts: 249
chrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond repute

Thanks Dale but I'm just switching from fsockopen to this set of functions http://www.php.net/manual/en/book.sockets.php. Hopefully this one will give me better performance (and if not, I want to give it a go anyway!).
__________________
Buyer pays Nominet transfer fees on any domains I sell.
chrisvaughanuk is offline  
Old 23-07-2010, 10:20:52 PM     #4 (permalink)

 
davedevelopment's Avatar
 
Join Date: May 2009
Location: Brough, East Yorks
Posts: 993
davedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond reputedavedevelopment has a reputation beyond repute

I think you'll need 5.3 for TCP_NODELAY
davedevelopment is offline  
Old 24-07-2010, 11:43:52 AM     #5 (permalink)

 
Join Date: Aug 2004
Location: Lancs
Posts: 249
chrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond repute

Thanks Dave but I'm on 5.3.2. I've just noticed that 5.3.3 was released two days ago - so I'll give that a try. Maybe it's a bug in 5.3.2.
__________________
Buyer pays Nominet transfer fees on any domains I sell.
chrisvaughanuk is offline  
Old 24-07-2010, 12:05:29 PM     #6 (permalink)

 
Join Date: Aug 2004
Location: Lancs
Posts: 249
chrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond repute

Nope, that didn't do the trick either. It's dodgy coding and not a bug then! At least I'm up to date with PHP now though!
__________________
Buyer pays Nominet transfer fees on any domains I sell.
chrisvaughanuk is offline  
Old 24-07-2010, 06:29:04 PM     #7 (permalink)

 
tifosi's Avatar
 
Join Date: Oct 2004
Location: Lancashire
Posts: 1,907
tifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond repute

You do have sockets compiled into your php don't you? Most hosts do, but better to check! You''ll need a quick php page with phpinfo() or php -v from command line
tifosi is offline  
Old 24-07-2010, 07:57:49 PM     #8 (permalink)

 
Join Date: Aug 2004
Location: Lancs
Posts: 249
chrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond reputechrisvaughanuk has a reputation beyond repute

Again thanks for the suggestion. I do have sockets set, yes. Sockets work fine; it's just the socket_set_option function that doesn't.
__________________
Buyer pays Nominet transfer fees on any domains I sell.
chrisvaughanuk is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
Which PHP framework monaghan Scripts and Coding 6 22-07-2010 08:31:56 PM
multiple autofill dropdowns from db -php quesion woopwoop Scripts and Coding 3 21-12-2008 02:53:57 PM
PHP include in a Smarty Template admin Scripts and Coding 1 13-05-2008 06:37:26 AM

75% off Domains at Network Solutions®.


All times are GMT. The time now is 12:40:28 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".