Jump to content
xisto Community

HmmZ

Members
  • Content Count

    365
  • Joined

  • Last visited

Everything posted by HmmZ

  1. This is a very tough one, the only easy way is sending the admins an e-mail and ask if you can fetch some data off their site, but maybe i can help you if you are more specific, url and what kind of fields you want to fetch.
  2. you are talking about PHPbb forum, wich has a mod called EasyMod, and should give you a more clear and easy install of hacks and mods for your phpbb forum. I've googled for ya and maybe these forums/topics help you: https://www.phpbb.com/community/viewtopic.php?t=160063&highlight= http://forums.devshed.com/archive/index.php?s=760653e15d21c11a54cc971bf1b01912 http://forums.xisto.com/no_longer_exists/ Hope this helps you
  3. http://forums.xisto.com/no_longer_exists/ sockets that is a quote of the introduction to sockets in the PHP manual I am completely unfamiliar with sockets, so I can't guide you through, Although i'm not familiar with it, I'll try to help you as much as I can, that way i can learn from it too opening tutorial board to make a tutorial based on items i'm going to read right now... I forgot the waiting time -.-. Ill post the link when it's approved (i think it hasnt become a bad tutorial )
  4. This tutorial is based on a question written in the PHP programming board Inspiration Introduction Sockets, an underused function in PHP, is a function that enables you to open connection to other peoples computers and vice versa. By sending commands to the operating server, it will first see if there's response, then, it sends or receives data that the operating server has available. Creation of a socket Of course, a first step in using sockets, is creating it, this is done by: resource socket_create ( int domain, int type, int protocol) and a more familiar seen example (php style): $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); *The first parameter you see in the brackets, AF_INET is the domain. The PHP Manual states the following regarding domains, there are 2 domains: AF_INET is the domain that is used for internet_based sockets, so you'll most likely be using this most often. *The second parameter in the brackets, SOCK_STREAM is the type of socket, SOCK_STREAM is full duplex, meaning you can read ĂĄnd write to the socket. *The last parameter in the brackets, SOL_TCP is the protocol, PHP knows 3 major protocols, icmp, udp and tcp, SOL_TCP is a constant protocol of TCP. Connection with a socketYou created the socket, now you need a connection to ultimately use it. socket_connect is the function that enables you to connect to other computers using a socket, the syntax for this function: bool socket_connect ( resource socket, string address [, int port]) The socket you created a few lines ago was assigned to the $socket variable, wich we can easily use in the socket connection syntax, now that we have both the create line aswell as the connection, we can connect to something, in this tutorial we will be connecting to an IRC server, on port 6667NOTE: The port and irc server has been taken from an item i've read about sockets, since i don't have my own irc server, and this connection can be tested in reality $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); $connection = socket_connect($socket,'irc.freenode.net',6667); Reading from a socketReading is of course an important element of sockets, as they are the actual interactivity with the client versus host, the socket_read() is the function that reads from a socket, the syntax for this function: string socket_read ( resource socket, int length [, int type]) let's expand our current codes with this function: $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);$connection = socket_connect($socket,'irc.freenode.net',6667);while($data = socket_read($socket,2046,PHP_NORMAL_READ)) //listen for any data, and echo that data out{echo $data;} NOTE: PHP_NORMAL_READ is a type of reading that will stop whenever the line terminates with a \r\n. Writing to a socket So far we made a socket, created a connection, and gave our script the socket_read() function. Now we need to reply to these readings with socket_write(). The syntax for this function: int socket_write ( resource socket, string buffer [, int length]) Of course, the resource socket is the creation of the socket, wich was assigned to the $socket variable, the string buffer is simply what you want to write to the socket. let's add this to our existing code: $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); // Create the Socket$connection = socket_connect($socket,'irc.freenode.net',6667); // Connect to freenodesocket_write($socket,"USER RHAP RHAP RHAP :RHAP\r\n"); // Send the Username to freenodesocket_write($socket,"NICK MyFirstSocket \r\n"); // Change our nicknamesocket_write($socket,"JOIN #TEST \r\n"); // Join the channel PHPFREAKS!!!while($data = socket_read($socket,2046)) // read whatever IRC is telling us{echo $data;}USER, NICK and JOIN are all irc commands that enable you to define the username, the nickname and what channel to join, in this example it's the channel #TEST, as you may have noticed, \r\n have been used, wich ends a line. Listening for connections on your own computer So far we created a socket, connected to a socket, written and read from a socket, now we are going to create a socket for users to connect and how to accept them when they try to connect, first we recreate our socket, no difference from the first socket creation: $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); Now comes the difference, instead of connection to a socket, you bind it to your own machine, socket_bind() is our function, with as syntax: bool socket_bind ( resource socket, string address [, int port]) as you can see, the parameters are pretty much the same as our other socket, just in a different function (socket_bind), let's translate this into PHP: socket_bind($socket,'localhost',1111); this binds the socket to the localhost on port 1111. A normal bind of course doesn't usually connect to localhost, so we'll replace that with a simple IP address: 111.111.111.111, the function would then look like this: socket_bind($socket,'111.111.111.111',1111); Now that you've bound your socket to your computer, let's listen from incoming connections, in this tutorial the way we're using the listen function can only accept 1 connection at a time. socket_listen() will listen and socket_accept can accept the connection. Let's add this to our socket code: $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); // Create our socket.socket_bind($socket,'111.111.111.111',1111); //bind the socket to our IP address, on port 1111.socket_listen($socket); // listen for any incoming connectionswhile($connection = socket_accept($socket)) // accept any incoming connection and write to the socket.{socket_write($connection,'You\'ve successfully connected to my computer!\r\n');} in this code, the socket listens for connections and once it detects one, it will send 'You've successfully connected to my computer' to the socket. Try it with your own IP on port 1111 . That concludes an introduction in PHP Sockets, the socket you just made, connected to, bound to, listened to, read and wrote to, is basically an IRC Bot (don't worry it's nothing illegal ). Anyway, I hoped this would make you understand a bit about what sockets do and how they are used in PHP, an IRC bot is just an example of what a socket can do. Feel free to experiment and see what comes out, you never know what great things you come up with I hope this helped you a bit.
  5. lol at Microsoft, crashed during a presentation, that's got to teach them to program more accuractely...I also experience it sometimes and it's a pain in the butt...why? because it always happens right before some thing is NEARLY done, meaning you'll have to do the whole thing all over again..
  6. no what you have to do, is always with headers like this and session_start() is put them in the very top of your page, so the first thing in your script should be: <?phpsession_start();Header("Content-type: image/png"); ?><html>//your html...in your script you dont need session_start, so take it off and you got your fix, it's a must for php scripts to have these kinda things at the very top, else it causes 'cannot modify header- headers already sent' errors
  7. heh, ill stick to photoshop CS for now (the regular one?). Just learning and not turning "pro" anytime soon . and the official prices for this kind of software is kind of insane though, but i guess people buy it because it's quality professional software
  8. Knew that one cool_freaker, it was the very first "tool" i used to kind of disguise my awful renders
  9. feedback/suggestion/comments greatly appreciated!
  10. haha ffanatics, just use a logout text link and direct it to the logout.php or use a page function and just logout the user on the same page, you don't need to use a form to log a user out, you could build a class in your index.php, for the logout, with an if() statement to ensure it works use the following link to function as logout: //make sure the user existsif($user){ echo "<a href=\"login.php?out=yes&user=$user\">Logout</a>";}then make the function "out" $logout = $_GET['out']; // makes sure their logging out$user = $_GET['user']; // gets the usernameif ($logout == "yes") {mysql_query("DELETE FROM active_users WHERE name='$user'"); // Logs them out} if you don't have an "active_users" field in your user table, you should add it, it makes life easier Anyway, hope this helps
  11. i personally love 7 and 9..try to use a diff pattern on 7 tho =/and 9 has just a great sig bgits a nice set anyways!and 12 is just funny!
  12. Allright, but it will take a much bigger amount of code then a normal submit button would, and it's only possible in javascript, meaning the users that dont have js support can't ever submit.. I will use an example form <form name="example" method="post" action="yourscriptname.php"> put the following code in your <HEAD> section <script language="JavaScript" type="text/javascript"><!--function example ( selectedtype ){ document.formname.supporttype.value = selectedtype; document.formname.submit();}--></script> then you can add this as your submit: <input type="hidden" name="supporttype" /><a href="javascript:example('submit')">Submit</a> Hope this helps you
  13. 1,4,5,7 are the best, but they all look great, if you could sharpen that lady on sig 2 it would be cool too "Yet Another Great Collection of Trap17s Sig guru Johnny!"
  14. Thanks Johnny, the first tutorial (adding a render) worked for me :Dand saint michael, it's great that you post, but reply something that i can use, wtf is blood rayne, and i've never seen your mario stuff..?
  15. Tell me tell me what you think! (for the record, yea im a crazy guy )
  16. <input type='image' src='image.gif' value='submit' name='submitlink'> works too, remember to use different names for value and name, can't be the exact same
  17. It's my first try on a new theme tho :lol:I will get on the border and the "white fluid"() when im back home from work.Thanks for the positive feedback
  18. Thats a first attempt...i played around with abstract brushes, and in there you see most likely the best rendered image i've done so far....sad aint it And don't ask me what the rendered pic is...i couldn't figure it out myself either, Feedback pls!
  19. A bit improved, gave the eye some more accents and gave the sig a small border (didn't want to overdo it as it wouldn't fit the sig..) Any good? Ow and btw, there may be some crouching tigers, but you're the one coming up with the continuous great sigs and the support for your fellow members, that's what makes a good sigmaker
  20. What you need is multiple "brush layers" i found out in my second sig that by using layer over layer (meaning 1 layer then use a brush on it (black), then another layer and some other grunge brush (white) to give it depth and that cool 'chaos' look)What i see on your sig is what has been mentioned to my first sig, more brushing, give it some spice and don't be afraid to use brushes
  21. Allright, so i keep trying to use already existing renders to blend it into my sigs to get my sig to actually have some content, but i can't do it, i keep getting a white or black border around the pic, inner shadow just gives a dirty pathetic look :rolleyes:Any tips?
  22. When it comes to making a webpage, there is 'first things first' with webhosting it works as followed: >make an index page for your website >upload it to your public_html folder, also known www >go to your cPanel and log in >browse to the url redirection settings >then do the following: http://forums.xisto.com/no_longer_exists/[empty space] >> http://forums.xisto.com/no_longer_exists/[your index page] then apply the redirection (you can choose to make it a temporary redirection or a permanent one) then you can use either: http://forums.xisto.com/no_longer_exists/ http://forums.xisto.com/no_longer_exists/ or even: your-domain.trap17.com It all redirects to the set redirection url Hope this helps you ^^
  23. well your second link in your post displays 4 links, wich are actually just text, so maybe add hyperlink property to them? Also, every other page i visit only displays errors, i dont know what you did, but you screwed up some things badly... And last but surely not least, this is website discussion stuff and not hosted members area stuff!
  24. yes its clean and simplistic, but this thread should be moved to the website discussion board, not in the hosted members area..
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.