Jump to content

djcubez

Members
  • Posts

    43
  • Joined

  • Last visited

About djcubez

  • Birthday 06/25/1988

Contact Methods

  • AIM
    J03Mo
  • MSN
    djcubez@hotmail.com
  • Website URL
    http://www.djcubez.com/

Profile Information

  • Gender
    Male
  • Location
    Milwaukee, WI

djcubez's Achievements

Member

Member (2/5)

0

Reputation

  1. I am not sure if this is possible with my current setup but I figure I would give it a shot. I am not familiar at all with the Facebook API but I understand it might be needed for this. Also, my question might pertain to Javascript or HTML more than PHP, but I thought I'd throw it our here in case it does need PHP. I have a PHP script that takes an already existing image, throws text and borders on it from a user input form, and then creates a .png file. The .png file is only stored for a day before being removed, as the images are being attached to emails and sent immediately. The script itself works great! However, there's been a request to allow users to post the image to their Facebook page/wall in addition to attaching the image to an email. I myself have found no easy way to do this, as the image files are not permanently stored on the server. All the research I've done has turned up discussions that end with "this isn't possible" or no solutions. So obviously my question will be "is this possible?" And if it is, how would I achieve it? Thanks! EDIT: I feel it's important to add that I don't want to start storing the images on the server permanently.
  2. Thank you so much for your response PFMaBiSmAd. I really appreciate it and I apologize I didn't come back here to follow up. We actually ended up dropping the client for other reasons and haven't had any complaints from anyone else. Thanks.
  3. We've been having problems with one of our clients who claims to not be receiving some of the contact submissions from the form. We don't have any Macs currently in the office, and had other people test it with Macs. They found that the forms weren't being sent when using Google Chrome as the browser in a Macintosh environment. I, for the life of me, have no idea what's wrong. I assume it's probably an HTML/doctype/charset issue, as PHP is run on the server-side. However, because of the obscurity of the issue (found nothing on Google) I thought I'd post here where a lot of advanced users seem to visit. Does anyone have any insight on this? Thanks.
  4. Well I've figured out that the connection is timing out because I get the '110' error. It must be a problem with the host then?
  5. Alright so I found an older script that opens up a socket connection to an IRC server as a user. You could use it for simple scripts, a bot or even as a chat client. All I want to do is have it join a specific channel, get the users and spit them out in a list. I'm doing this to generate a list of users in a chat for a website. So I bet you're all wonder what the problem is right? The script works perfect on my home server. Executes fine, joins fine, grabs the information fine. It's flawless. However, whenever I put it on any web host all I get is a blank page. Does anyone know why? I've heard it's because some hosts block socket connections because they can't monitor that bandwidth usage but I don't know how reliable that is. I'll post the code below but if anyone has any suggestions I'd love to hear them. <?php //First lets set the timeout limit to 0 so the page wont time out. set_time_limit(0); //Also inclue our config file include_once("config.php"); //Second lets grab our data from our form. $gotusers = "0"; $randomnumber = rand(1000, 9999); $nickname = "PackersHome" . $randomnumber; //Now lets check to see if there is a nickname set. //Ok, We have a nickname, now lets connect. $server = array(); //we will use an array to store all the server data. //Open the socket connection to the IRC server $server['SOCKET'] = @fsockopen($server_host, $server_port, $errno, $errstr, 2); if($server['SOCKET']) { //Ok, we have connected to the server, now we have to send the login commands. SendCommand("PASS NOPASS\n\r"); //Sends the password not needed for most servers SendCommand("NICK $nickname\n\r"); //sends the nickname SendCommand("USER $nickname USING PHP IRC\n\r"); //sends the user must have 4 paramters while(!feof($server['SOCKET'])) //while we are connected to the server { $server['READ_BUFFER'] = fgets($server['SOCKET'], 1024); //get a line of data from the server //echo "[RECIVE] ".$server['READ_BUFFER']."<br>\n\r"; //display the recived data from the server /* IRC Sends a "PING" command to the client which must be anwsered with a "PONG" Or the client gets Disconnected */ //Now lets check to see if we have joined the server if(strpos($server['READ_BUFFER'], "376")) //422 is the message number of the MOTD for the server (The last thing displayed after a successful connection) { //If we have joined the server SendCommand("JOIN $server_chan\n\r"); //Join the chanel } if(substr($server['READ_BUFFER'], 0, 6) == "PING :") //If the server has sent the ping command { SendCommand("PONG :".substr($server['READ_BUFFER'], 6)."\n\r"); //Reply with pong //As you can see i dont have it reply with just "PONG" //It sends PONG and the data recived after the "PING" text on that recived line //Reason being is some irc servers have a "No Spoof" feature that sends a key after the PING //Command that must be replied with PONG and the same key sent. } if(strpos($server['READ_BUFFER'], "353")) { // Displayed users // Get strpos $chunk = $server['READ_BUFFER']; $startpos = strpos($chunk, "353"); $endpos = strpos($chunk, "366"); $lengthpos = $endpos - $startpos; $line = substr($chunk, $startpos, $lengthpos); $line_parts = explode("353", $line); $line_parts = explode(":", $line_parts[1]); $users = explode(" ", $line_parts[1]); $usercount = count($users); echo "<br /><b>Users</b>: " . $usercount . "<br />"; for($i = 0; $i < $usercount; $i++) { echo $users[$i] . "<br />"; } //echo "<b>$chunk</b><br />"; $gotusers = "1"; } flush(); //This flushes the output buffer forcing the text in the while loop to be displayed "On demand" if($gotusers == "1") { fclose($server['SOCKET']); exit(); // got everything } } } function SendCommand ($cmd) { global $server; //Extends our $server array to this function @fwrite($server['SOCKET'], $cmd, strlen($cmd)); //sends the command to the server echo "[sEND] $cmd <br>"; //displays it on the screen } ?> CONFIG.PHP <?php //The server host is the IP or DNS of the IRC server. $server_host = "chat.freenode.net"; //Server Port, this is the port that the irc server is running on. Deafult: 6667 $server_port = 6667; //Server Chanel, After connecting to the IRC server this is the channel it will join. $server_chan = "#PackersHome"; ?> FYI: I found a web host that lets you use socket connections but it still doesn't work there: http://djcubez.hostoi.com/scripts/irc/ircconnect.php
  6. Word man. I spent about 2-3 hours working on this and calling godaddy back and forth until I decided 'screw them' and put the PHP script on my personal web account. I don't know why I didn't do that earlier to be honest...probably because I didn't want the professional site to link to my gaming clan's website...oh well lol.
  7. I'm actually looking into ASP now LOL. Never thought I'd do that before... :/
  8. This is extremely urgent. As I've just understood GoDaddy has disable the mail() function for Windows hosting accounts. It's pretty annoying especially since I'm launching a site TOMORROW that's going to be in the newspapers on the front page and I need to send emails for ticket sales. Since I can't do it with PHP I figured there has to be someway to get around this whether it's a different programming language (ASP or CGI) but I have no knowledge of those. I also wonder if anyone has found a way around this? Please let me know!
  9. Exactly what I did. Thanks for all your responses.
  10. Yea pretty much. It's not like it's expensive it was more or less a timeframe/business decision. It looks like we'll probably be buying another hosting account in the near future.
  11. Alright this is a fairly simple question. I have web hosting for my current site, let's say for example sake www.shoes.com. That site is all well and fine. Now I want to start a new website called www.coats.com that is an entirely separate site, however I want to host it on the same web hosting. Basically, I have coats.com setup at shoes.com/coats, but instead I want it to say coats.com. I know masking works like that, however I want the links on the page to work in a way so that, when someone goes to coats.com and clicks on an internal link, let's say 'sports jackets', instead of it (the address/browser bar) saying "coats.com" or "shoes.com/coats/sportsjackets.html" it says "coats.com/sportsjackets.html." I am aware that masking usually just uses a frameset as trick which is why the browser permanently says "coats.com." However, I was wondering if there any possible ways to do this, perhaps with mod_rewrite? Thanks
  12. try adding display: block; to your a:link
  13. I'm having a problem with my layout where there seems to be a padding-top of 9px that firefox reads, it's entirely messed up. I spent all day looking over my code yesterday and could not find out why the image in the div was being pushed down so low, it makes no effing sense and i'm at a breaking point on this. You can see it here: http://www.thedjcubez.com/work/knuckleheads/ Here's a side-by-side comparison: http://www.thedjcubez.com/work/knuckleheads/Screenshot_SBS.jpg index.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Knuckleheads Tobacco</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="wrapper"> <div id="border"> <div id="header"> <div id="header_top"><img src="images/header/top.jpg" alt=""></div> <div id="navigation"><img src="images/header/left.jpg" alt=""><img src="images/navigation/home_reg.jpg" alt=""><img src="images/navigation/products_reg.jpg" alt=""><img src="images/navigation/stores_reg.jpg" alt=""><img src="images/header/mid.jpg" alt=""><img src="images/navigation/employees_reg.jpg" alt=""><img src="images/navigation/policies_reg.jpg" alt=""><img src="images/header/right.jpg" alt=""></div> <div id="header_bottom"><img src="images/header/bottom.jpg" alt=""></div> </div> <div id="container"> <img src="images/space_bar.gif" alt="spacer" /> <div id="content"> <p>Hello and welcome to www.knuckleheadstobacco.com!!! We are glad to debut our much anticipated website. After a lot of time and effort it is finally here for your viewing pleasure.</p> <p>Established in 1995 Knuckleheads has always strived to stay ahead of the competition and provide Madison and Milwaukee with the most complete tobacco and accessories stores in Wisconsin. Come on in and check out all the new and exciting products we have in stock and will continue to develop in the future.</p> <p>Thanks for your patronage!!!</p> </div> </div> </div> <img src="images/footer.jpg" alt="footer" /> </div> </body> </html> style.css /* Defaults */ * { margin: 0; padding: 0; } body { margin: 0; text-align: center; background-color: black; } img { border: 0; } /* IDS */ #border { width: 800px; background-image: url("images/background_border.gif"); background-repeat: repeat-y; } #container { width: 700px; text-align: left; margin-left : 50px; margin-right: 50px; } #content { padding: 15px; font-size: 11px; font-family: arial, sans-serif; } #header { width: 800px; height: 200px; } #header_bottom { width: 800px; height: 6px; } #header_top { width: 800px; height: 172px; } #wrapper { width: 800px; margin-left: auto; margin-right: auto; } /* Navigation */ #navigation { width: 800px; height: 22px; }
×
×
  • Create New...

Important Information

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.