Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. Not all functions work in linux and windows, some are unique to the OS. That was my meaning.
  2. What you describe is most likely in just that theme. Is unlikely to be in the css file unless was an image. I would look in the header.php file of that theme instead. Also possible the theme creator made a new function in functions.php Paste the header.php for that theme here in the forums code tags. Use the <> button.
  3. If you show the errors someone can most likely help. Does it come down to owner permissions such as root or www-data? are you calling to a shell file then execute? directly calling to the php script? Most admin panels have the ability to easily create a new cron job You could research which panel you are using and find out how. I use webmin Go to system/Scheduled Cron Jobs Create a new scheduled cron job. select the user for permission insert a command something like this /usr/bin/php -q /var/www/my-php-script.php select when or how often would like it to run click Create Is other places to set crons as well such as in etc/cron.d etc/cron.daily etc/cron.hourly etc/cron.monthly etc/cron.weekly Since I use ubuntu will link you to here which is similar to other linux versions and cron commands https://help.ubuntu.com/community/CronHowto
  4. I wanted to clarify my last statement better. If your intended website is a linux server, windows is not the same as a linux server is. I prefer to set up ubuntu server and install a desktop gui for development. This way it can be exact to what your production is. Even if was a windows server would be using iis.
  5. Does your wamp install work? If you visit localhost or 127.0.0.1 in your browser what do you see? Wordpress requires mod rewrite enabled Edit your apache config file and uncomment this LoadModule rewrite_module modules/mod_rewrite.so Also find the directory block make it this <directory /> Options All AllowOverride All </directory> Change everywhere is AllowOverride None to AllowOverride All Browse to C:\Windows\System32\drivers\etc\hosts If you want to map your pc to a domain. example of some rules if the computers ip is 192.168.1.2 127.0.0.1 localhost # ::1 localhost localhost mysite.com 192.168.1.2 mysite.com 192.168.1.2 *.mysite.com If plan on doing multi wordpress and just local set it to localhost.localdomain Restart apache service to see the changes. Edit: If you are trying to do a domain and people outside your localhost see it, you also need to forward port 80 and any other ports you want within your router to your computers ip. To be perfectly honest, windows is not the same as a linux server is. I prefer to set up ubuntu server and install a desktop gui for development. This way it can be exact to what your production is.
  6. Understood. You don't really want to cache the api url itself, but the data within. Don't want to give people something for nothing, still log each request. I've been making a universal api front door so to say for all my api's. Does the key check, remote ip, goes through clients allowed domains. Then depending if is allowed will call on the particular api and it's url parameters to process the request. Those cached results could be in a folder outside www and included versus being publicly viewable. Even if saved the data as json or xml and parsed upon view versus something like a html cache.
  7. Another idea I had was using the clients remote ip in a session, at least that could limit just them to a one time request. $remote_ip = $_SERVER['REMOTE_ADDR']; if (strstr($remote_ip, ', ')) { $ips = explode(', ', $remote_ip); $remote_ip = $ips[0]; }
  8. Is this some sort of attempt to limit requests like a queue? $requestCount = 0; while($requestCount < 20) { $data1 = $restRequestHelper->fetch(...); $data2 = $restRequestHelper->fetch(...); $data3 = $restRequestHelper->fetch(...); $data4 = $restRequestHelper->fetch(...); $data5 = $restRequestHelper->fetch(...); $requestCount++; }
  9. Can you cache the responses and set expire times? At least that would take the load off the cpu.
  10. Maybe you can make a session per client before you call the ajax script If session exists don't call the script again. Remove the session when ajax script completes. http://php.net/manual/en/book.session.php
  11. Try padding-bottom:10%; Can also try things like max-width: 100%; height: auto;
  12. Using wildcard subdomains you can set it up any subdomain would work. If a folder was added then it would use from the folder. If you want to change subdomains on the fly you could do it all from the main site root www/index.php file with a controller...any other rules would like. Make database tables for each subdomain as needed. I'm heading out the door right now for the day, will explain it more when I can.
  13. http://validator.w3.org/#validate_by_input
  14. One of your companion sites would be a good reason, so don't need additional registration and logins
  15. You now need to execute the query mysql_query()
  16. I really like the second one, am going to integrate this into my project. Thanks Psycho.
  17. If you set a cookie for a subdomain.domain.com it only works for that. If you set the cookie as .domain.com will work for all. Cookies can only be set from the same domain. Placing it there as an image with no style could load that script in the background so can add additional domains.
  18. Took me a bit to find this, I did this for a multi-wordpress site in where i had to set the video sizes the same across all subdomains in a plugin. <script> function setCookie(c_name,value,exdays,domain,path){ var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : ("; expires="+exdate.toUTCString())); cookie=c_name + "=" + c_value; if (domain){ cookie += "domain=" + domain + ";"; } if (path){ cookie += "path=" + path + ";"; } document.cookie=cookie; } setCookie("screen_width",winW,60,"/",".domain.com"); setCookie("screen_height",winH,60,"/",".domain.com"); </script>
  19. Cookies are domain restricted, could be a host or subdomain. http://tools.ietf.org/html/rfc6265 *A Set-Cookie from request-host y.x.foo.com for Domain=.foo.com would be rejected, because H is y.x and contains a dot. * A Set-Cookie from request-host x.foo.com for Domain=.foo.com would be accepted. * A Set-Cookie with Domain=.com or Domain=.com., will always be rejected, because there is no embedded dot. * A Set-Cookie with Domain=ajax.com will be rejected because the value for Domain does not begin with a dot. Is a trick to add a cookie multiple domains. On site1.com add this. <img src="http://site2.com/set-cookie.php" style="display:none;" /> <img src="http://site3.com/set-cookie.php" style="display:none;" /> Is also other methods using js or ajax to send cookie data, but I'd be a little weary any sensitive data.
  20. I guess if you want feedback on specific areas, a multiple poll system sounds the best. Create each poll with your question and possible answers, such as ease of use, the looks, performance If you let people comment on everything is no good way to organize it. You can add an optional comments along with their poll answers to get additional feedback as to why they made their decision.
  21. Everything can fail. With any business is usually a risk factor...or everyone would be rich. The biggest factors will be total costs, profits and current trends. Naturally if have money to spare, this becomes easier that can take more risks and chances of turning a profit. As for myself I like to always keep the overhead and initial investments next to nothing, expect to fail, hope to succeed. In this way it's easy to try many ventures. I self retired myself from punching a time card in 1998 at age 27 and took the plunge trying new businesses with something that sparks my interest. Have had a pile of businesses in real life and also online. Construction company for commercial and residential all phases, automotive garage, anything computer related such as building, repairing, networking, programming, freelancing. I saw the local work drying up and people either wanting to pay dirt cheap or simply not get the work done. I don't mind hard work. I worked 15-18 hour days 6 days a week for many years. What I don't like is working for nothing. The business and personal bills still come even if the clients don't. Around the year 2001 I shifted myself back to the computer field which before then was just a hobby since age 8. Online businesses make the most sense, are open 24/7 every day of the year, you can be open even while you sleep or are out. Some of my websites were movie and tv indexes, article aggregators, server and website hosting, web casting community, my free search engine and websites index, even had a blog where I wrote tutorials. ha ha Only the hosting and the article aggregator ever turned a large profit, the others I created so people can use them and never tried to profit. You have to have multiple sources of income and really helps if one of those is a guaranteed income. The days of ads for revenue has been long gone, they just don't cut it. So anything based on views with ads is most likely going to fail. It's hard to get people to flock to something new, usually the word free does that, but that defeats the goal here. My opinion is you need to have a product or a service. You or others working for you doing paid work or some type of pay for application you make. In simple terms... you need to have something to offer them, either a physical product or you as the product. Honest work for honest wages still exists. There is some profit to be had in hosting and resellers, but takes a lot of work and the knowledge. I'm talking like renting or owning dedicated servers and selling off dedicated or virtual private servers to others. There are applications like xenserver, solusvm, hypervm, virtuozzo Can host custom or pre-made websites like wordpress and joomla as an example. Believe it or not is still many people totally clueless about how to even get a website...let alone set it up and configure it how they want. I did very well a while with hosting, my main business plan was providing free websites with my ads on their pages. When adblock came out it couldn't even pay a monthly server bill. If i had it set up where people paid a small monthly fee could work. I was setting it up that way but leaned a different direction completely. ohv.com has a few decent priced powerful servers I feel can profit from. Consider this one http://www.ovh.com/us/dedicated-servers/range-2013/2013-EG-128.xml Because has so much power, space, memory, bandwidth, network speed, you can do a pile on that one machine. If you pay the yearly is a month free as well. You need to make less than 10 dollars a day to pay for that server, so figure out ways to profit off that. I'll tell you my current plan which I am still creating. I doubt it will ever really be done, but something generating income will be nice. Selling services to other websites through multiple api systems. Some of the services I'll offer: Automatic video embedder which supports many thousands of websites, can actually discover sources, use different players. Just by using a url of a page or the video source itself...an embedded video magically appears. Article previews including images, again by just a url. All sorts of scrapers and crawlers, links, images, articles, files Feed related like sidebar displays, aggregators,feed creators for own site. Sitemap creator,reader. Domain and ip policy restrictions, possible for allowed or banned sites protection for sites, links, applications. Safe filtering or parsing of the html. Image thumbnails, website and page snapshots, galleries, sliders Easy SEO integration. opengraph, oembed, additional meta, auto generated keywords with negative keywords lists. Spammer protection. Video search and youtube search term auto generated playlists. That's just to name a few already have created. Will use a simple credits system with a penny per view. They buy however many credits they want, use any one of my many services and a credit gets deducted. Their credits roll over into next months unlike other services usually do. With others are almost forced to buy larger packages not needed or risk the service not working. Every month leftover credits are lost and a new package begins. For years I have made applications,snippets and so on, always with intentions to sell but never did. Is too many thieves out there that will copy it for free or even change it and call it their own. Selling them as services seems like a good way to keep my code safe while also helping others get what they need at their websites. I'll consider hosting or protecting others api/services/scripts through my site and services. Contact me any time and let me know. Yeah and is a lot of hard and frustrating work dealing with people sometimes not knowing what they want. Building a trusting and reliable reputation can get you places. Kudos to you for sticking with it, I know first hand takes some real effort. Sorry for the long winded post, had a lot to say.
  22. Did you mess up the positions of that wildcard? * I would hope the data already in your database is safe. $sqlhorses = "SELECT * FROM Place WHERE `Horse` ='".$row['horse']. "' GROUP BY id DESC LIMIT 10"; Sounds like you need pagination, there is an old tutorial here at phpfreaks can follow, but should make it mysqli or pdo http://www.phpfreaks.com/tutorial/basic-pagination with pagination would also include the startrow GROUP BY id DESC LIMIT 0,10 GROUP BY id DESC LIMIT 9,10 GROUP BY id DESC LIMIT 19,10
  23. <?php //error reporting error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); //start the session session_start(); //connect to db require_once("scripts/connect.php"); if (isset($_POST['loginbtn'])) { $errors = array(); if (isset($_POST['username']) && trim($_POST['username']) != '') { $username = mysqli_real_escape_string($db, trim($_POST['username'])); } else { $errors[] = "Missing username"; } if (isset($_POST['password']) && trim($_POST['password']) != '') { $password = mysqli_real_escape_string($db, md5(trim($_POST['password']))); } else { $errors[] = "Missing password"; } if ($username && $password) { $getstaff = "SELECT (username,password) FROM `users` WHERE `username` = '" . $username . "' AND `password` = '" . $password . "'"; if ($result = mysqli_query($db, $getstaff)) { while ($row = mysqli_fetch_row($result)) { //create the session $_SESSION['username'] = $row['username']; //redirect them to the control panel header("Location: controlpanel.php"); exit(); } } else { $errors[] = "No Results"; } } else { $errors[] = "username or password missing"; } } if (!empty($errors)) { foreach ($errors as $error) { echo $error . "<br />"; } } if ($db) { mysqli_close($db); } ?>
  24. The error states that page_header() function does not exist. Considering the default wordpress hook is get_header(), am going to assume this is supposed to be a function included in your theme. I would examine your functions file within your theme and ensure that function exists, properly closed. For the record, your site has a ridiculous amount of css and js includes.
×
×
  • 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.