Jump to content

remenissions

Members
  • Posts

    53
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

remenissions's Achievements

Member

Member (2/5)

0

Reputation

  1. To keep it simple I've searched all over google and these threads trying to find some tutorials on long polling. There's plenty of them too! The problem is I cannot seem to find any without frameworks like Jquery. Does anyone know of some guides or steps into turning a regular Ajax request into long polling without frameworks like Jquery?
  2. Thank you so much for your reply! Are there other common ISP I could use so I can continue to host my own server?
  3. Hey guy's, I have a private web server that I have set up for small business use. About 5 months ago I switched from using a web host to using my desktop to host myself. I have xampp apache with windows 8. I'm not for sure why, but just recently I have been unable to have people access my webserver. I can connect to it fine when I am connected to my own router. I don't come here for help unless I've put a good ammount of time (days) trying to figure it out myself. When I was told that the home page was not loading the first thing I noticed is that my external ip was different. So I set the dns to point to my new external ip hoping for a quick fix. After that I checked to make sure my LAN ip was static and it is. After that i checked my netgear router and port 80, 81 are still forwarded for TCP. I checked at canyouseeme.org and the connection timed out. My next thought was that maybe after I recently installed Norton Anti-Virus the firewall settings were blocking something, so I made a new traffic rule for port 80 to be allowed under their firewall settings, I restarted my router and computer and still nothing. I have cox communications for an ISP, some responses i saw on google said the ISP could be blocking the port, but would they really block the apache port? Even after the port has already been working? I'm kind of stuck where to look from here. I noticed some people say you can edit a file in apache conf and have it listen to 8080. I'm at work now so I can't mess with it right now, I'm going to look into it tonight when I get off, but before I mess with something I am not experienced with I was hoping to see what some one more qualified would think. Any Idea's guys? Much appreciated. [Edit] I also downloaded Port Forward and attempted to use it to see if it could fix the problem for me, how-ever it did not.
  4. You could probably store the data in a database and read the session data that way.
  5. Well they just called me again today, I guess the problem is they don't offer it with out hosting. Which was extremely deceptive considering they have you register a private domain for 16$ and then say unless you let us host for you for 50$ extra a year you're stuck with our advertisement banners on your website. I went with Kevin's suggestion at hover.com and it was exactly what I needed. I did however notice they put a little pop-up box advertisement if you click on an href link but its no problem at all. I'm pleased.
  6. Thanks Trq I appreciate your help everytime! I called Register.com up and I was like I paid 5$ for the domain name, 11$ for it to be private, the guy on the phone said ah yes you bought our basic package. So what seems to be the problem? I'm like well I'd like to get the banner removed that you include with it, He says you'll have to upgrade to our premium package for 50$ more a year. I asked what comes with the premium package, he said we'll remove the banner for you. He cancled the account for me thankfully, and refunded me my money. I realize advertisement is the key to success in these kind of businesses. but I'm not paying 75$ a year when I can get so incredibly much more for 100$ a year. Anyways again, thanks!!!
  7. Hi guys, I'm not sure if this is the right spot or not, but I have a question about domain names. For awhile now I have been using bluehost.com to host my online website. Recently I built a computer to replace that and set up my own webserver (hoping to reduce the 100$ a year). After portforwarding I wanted to register a Domain name so users can get to my domain. I went to register.com and made one for 15$, but they are wanting to charge me an extra 50$ to not put their stupid advertisement on it. I tried hiding it with css and deleting it with javascript but it automatically reloads into the webpage.... I am really upset and I feel scammed. Bluehost offered everything for a great deal, all I am wanting is a domain name...are there better options??
  8. Perhaps theres spaced lines in your require('recaptcha'); ? I've had that happen before it is very tedious. If it is making that last insert when you run the code I'd definately check that.
  9. Are you using ajax to make the request? If not it sounds like what you're doing works fine, I'm no expert but here's how I'd do it... If you are using ajax you could write a special callBack function to parse the request to store the links back into an array. Does that help any??? Could even mess around with the javascript some to make transition effects echo "<script type='text/javascript'> var img_Url = new Array();"; //connect to Db here. $links = mysql_query("SELECT links FROM Photos ORDER BY Id LIMIT 100"); $ctr = 0; while($src = mysql_fetch_array($links)) { echo "image_Url[$ctr] = '{$src['links']}';"; $ctr++; } //close connection echo "</script>"; <style type='text/css'> #box { position: fixed; width: 100%; height: 100%; z-index: -1; } #box img { width: 100%; height: 100%; } </style> <script type='text/javascript'> setInterval(function(){ document.getElementById('box').getElementsByTagName('img')[0].src = img_url[Math.floor((Math.random()*100)+1)]; }, 10000); // 10 seconds </script>
  10. Here's something I used to use longgggg ago if you want it, its not preg_match but it gets the job done. function get_string_between($string, $start, $end) { $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len); } $curl= curl_init(); curl_setopt($curl, CURLOPT_URL, '(PUT YOUR LINK HERE)'; curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($curl); $Info = get_string_between($data, '<span>', '</span>');
  11. Well I noticed for one $query = mysql_query(""); $result = mysql_query($query); Should be $query = ""; If that doesn't solve it then ontop of that try using while($row = mysql_fetch_array($result)) { echo "<br>".$row['EVENT']."<br>".$row['DOE'];// so on so forth }
  12. Your issue is line 283, you can't do " '$background' ". You could try " '{$background}' ". Or to make it simpler abandon the whole switching html to php. Keep it in php echo "<img src='".$background."'>" or echo "<img src='{$background}' />" That is assuming you have the background link in your $_SESSION already, I'm not sure if you're asking how to save it to the database or not but if so something like mysql_query("INSERT INTO Account (Background) Values ('{$Background}')"); Then you can access it later, is that what you are asking? Also I noticed you are saving your passwords with md5, if you're expecting other users besides a few close friends. You should look into a different password hashing and use salts.
  13. Spaced out what I have to help make it more clear, hope it helps with readability some. class session { public static function start($name = 'Account', $limit = 0, $path = '/', $domain = null, $secure = null) { if(session_status() == PHP_SESSION_ACTIVE); else { $domain = isset($domain) ? $domain : $_SERVER['SERVER_NAME']; $https = isset($secure) ? $secure : isset($_SERVER['HTTPS']); session_name($name); session_set_cookie_params($limit, $path, $domain, $secure, true); session_start(); if(isset($_SESSION['Account_Id'])) { //Regenerate Id by 10% chance or so. } if(isset($_SESSION['User_Agent']) != $_SERVER['HTTP_USER_AGENT']) { //Let the user know another device has accessed this session } } } public static function set($item, $data) { $key = Filter::key(); $_SESSION[$item] = Filter::encrypt($data, $key); return $key; } public static function get($item, $key) { $data = Filter::decrypt($_SESSION[$item], $key); return $data; } }
  14. Hey guys, I'll try to keep this short and simple. I've spent hours upon hours (probably 30-40+ over the week) trying to decide the best and most secure route to take with php sessions, I wouldn't trouble the community for help if I haven't put the time into it myself. After looking around I have come across a basic thought: - Check if session is already active - Set name and Params - Start Session - Check user_agent\ip (I'm not pushing this so much other than letting logged in users be aware of another device) - Regenerate Id and allow old Session id to work for a minute or so - Write encrypted data - Read encrypted data Pretty much I'm stuck on Regenerating the Id, I see how others are doing it but i guess i'm intimidated by it. Also, I have seen a few others who connect to the database to update regenerate id and update every write to store data. Performance wise is this worth it? I know if you're working with multiple servers this can benefit passing the session data, but if this is the case.
  15. Ok thank you very much I just wanted to make sure
×
×
  • 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.