Socks

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Socks

Post by sticksys »

hi there, i'm not new in PHP but i never worked with socks..

is some ome here can teach me use socks?

thanks in advance =]
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Must... Resist...
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Hold the top (opening) of the sock in both hands, and stretch it to a good-looking size.
Pull the sock over your foot, and as far up your ankle as it will go.
Let go, and the sock will magically stay put! That's all there is to it!
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Sorry, couldn't help it.
sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Post by sticksys »

lol..... O.K


:twisted:
sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Post by sticksys »

some body? :cry:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'm going to guess you're referring to sockets?

fsockopen() has a lot of useful information and examples on working with sockets. Although complex, the SHA256 Code Snippet here tries to use fsockopen() when the url wrappers are offline to request a remote file. That may help with a working example as well.
sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Post by sticksys »

yeah it's sockets i fought that in english it's different :roll:

thanks you =]
sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Post by sticksys »

ohh i forgot, how can i user sockets with softwares or hosts? like radio, cheking who is on now and stuff, and like icq, send message to a number.


can you help me with that?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

The only thing you can do with sockets is read/write from them. Just as you would read from a file(stream) or whatever...

So you have to lookup the protocol/language you want to talk to a server.. For example, if you wan to recieve a file from a webserver, you would have to talk HTTP and you would probably say something like:

Code: Select all

GET / HTTP/1.1
Host: timvw.madoka.be
Or if you were talking to a telnet server:

Code: Select all

user john
pass doe
echo bar
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you may find several libraries for those on phpclasses.org, failing that (and google), you'll need to figure out which API's the services support to write a connection to each. It can be quite complicated, so getting to specifics would help.


I'm pretty sure I saw an ICQ connector on phpclasses......

http://www.google.com/search?q=ICQ+site ... lasses.org
http://www.google.com/search?q=radio+si ... lasses.org
sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Post by sticksys »

i realy hate to copy or see files, i just wanna a little guide of the basics =]
User avatar
dbevfat
Forum Contributor
Posts: 126
Joined: Tue Jun 28, 2005 2:47 pm
Location: Ljubljana, Slovenia

Post by dbevfat »

sticksys wrote:i realy hate to copy or see files, i just wanna a little guide of the basics =]
You'll have to copy and see a lot of files if you want to learn :)
sticksys
Forum Commoner
Posts: 33
Joined: Thu Aug 18, 2005 3:23 am
Location: Isreal
Contact:

Post by sticksys »

i can learn in 2 minutes i'm not a noob, i'm 1.5 years in Php =]
brookie
Forum Newbie
Posts: 7
Joined: Thu Aug 18, 2005 10:35 am

Post by brookie »

Post Reply