![]() |
| Domain Name Sales | Domain Software | Calculate UK Domain Drop Dates | Domain Registration | NameDrive | Domain Parking | Subscribe to our Domains For Sale newsletter |
| | ||||||
| Home | Register | Rules | Membership Upgrade | Domains For Sale | Domain Name Escrow | Mark Forums Read | Domain Classified | Chat Room |
| Scripts and Coding PHP, MySQL, scripts |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
![]() | 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. |
| |
| | #3 (permalink) |
![]() |
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. |
| |
| | #4 (permalink) |
![]() |
I think you'll need 5.3 for TCP_NODELAY
|
| |
| | #5 (permalink) |
![]() |
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. |
| |
| | #6 (permalink) |
![]() |
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. |
| |
| | #7 (permalink) |
![]() |
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
|
| |
| | #8 (permalink) |
![]() |
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. |
| |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
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 |