Everything posted by SniderDK
-
Apache2 server configuration, with PHP ?
Hi, its because with Ubuntu a lot of packages won't be installed, in this case it would be the GD lib... sudo apt-get update sudo apt-get upgrade sudo apt-get install php5-gd *** disclaimer, i have been using red hat for a couple of years now so might not be exactly correct, none of those commands will break your machine tho **** run the above in the terminal and that will install the GD lib... if you do a <?php phpinfo(); ?> on both machines and compare which libs is missing... then try the apt-get command using php5-{name of package}... some are just php-{name of package} but try the php5 version first.... if you are stuck as to what package try doing a search " apt-get search php " a trick i normally do is install phpmyadmin as it would install most of the normal packages you need... and is fine for a dev box. sudo apt-get install phpmyadmin another alternative is to use Zend Server - community edition
-
Can a php object have an object as one of it's properties?
Hopfully some sample code is the better answer... i wrote this on the forum, and as such does not function. <?php class UserRole { function add($key){} function allowedAccess($key){} } class UserProfile {} class User { function __construct($id == false){ if($id){ $this->role = new UserRole($id); $this->profile = new UserProfile($id); } } } $user = new User(1); // passing user id one $user->role->add('some text to pass to UserRole->add()'); if(!$user->role->allowedAccess('contentEditing')){ die('you dont have permission to do this'); }
-
Contact Me forms
HTML is just a mark up language, to do processing you need to use a programming language like php for example... so html is just a formatting method not a processing method to put it simply
-
Shoutcast - PHP to display when stream is live?
yes, if you google for shoutcast widgets you will find something.. track playing, people listening are all bits of information available from shoutcast servers for people to display
- Form validation issue
-
PHP echo only month from record
<?php $parts = explode('-', $row_events['fromdate']); echo $parts[1]; ?> if thats uk format or <?php $parts = explode('-', $row_events['fromdate']); echo $parts[2]; ?> if it is USA format
-
SSL Encryption on an ajax based site
in short, yes.
-
Weekend breaks affiliate schemes?
booking.com have a white label service... maybe check that out... http://www.booking.com/general.en-gb.html?aid=356983;label=gog235jc-general-en-XX-docsaffiliates-unspec-gb-com;sid=ce156cd8a63658e7f2150c9649b81edf;dcid=1;tmpl=docs/partners_affiliate_examples
-
payment gateways (woocommerce)?
Hiya, if you look at the payment gateways for woocommerce there is one called CardStream which uses a hosted form (on our end) so the customers submit their card details on our PCI Level 1 system meaning you can just do a self assesment to pass PCI. taking card payments requires a merchant account which we can help your customer find the cheapest https://www.cardstream.com/paymentgateway/merchant-accounts if you are kinda wondering what a Gateway does then take a ganders here: https://www.cardstream.com/paymentgateway/payment_gateway
-
Small payments UK
only way i know how to achive micro payments like this would be to impliment your own account system and charge in larger blocks so the micro payments go through as one payment... obviously thats got massive draw backs to you. i use micro payments alot for a game i play via steam, other than being pure evil my bank statement is also littered with steam payments so see where your coming from just dont think there is a way around it via the payment gateways
- please please can you check that template for any malwares please
-
Blog linking to your website
Hey, Panda was about duplicate content, content farms etc.... it is widly talked about online. Pengin is a direct attack on SEO and spam, as pointed out above SEO is gaming the search engines... and there for is spam in a search engine sense. these are 8 guidelines taken verbatum from google on the recent update... its quite telling really. Anderz i've not seen your blog so was talking in general, and was trying to strike up a convo. evedntly my view point is a controvertial one.... i talk in a absract way about stuff which you have to, im not saying Matt cutts blog is bad.... but hes not using as I described... he actually talks about stuff... that intrests people who link to him... http://www.moo.com/blog/ moo's blog would fall under my spamdar i supose... because focus its pushing products, not talking about... stuff... I should of made myself more clear rather than tacking the sentence onto the end of my post in a cryptive way... "its a very subtile diffrence in intent that results in a massive diffrence to writing."... im not saying blogs are bad, im saying they are often used wrongly... without pointing fingers at anyone in perticular apart from the moo thing above, but you guys forced that one out to show you what i mean. also, Anderz... it is somtimes given a bad name because of sharlitons and blackhat marketeers making a quick buck.... ive been doing this for like a decade and know fully why its got a bad name.... because its wrong... white, gray or black its gaming the search engines for bussiness results... and the goal of any bussiness is to make more money... and thats the pitfall... there is never engough results... more is allways wanted, and todo that tricks get used which make it ruddy hard to make a search engine... and for people who play by the rules to rank. expressing opionions is not what gives the SEO industory a bad name, and is actually how the SEO industory progresses in general. this forum is a place to talk... and talking is what im doing so implying im giving the SEO industory a bad name by the expresion of my research/views is below the belt. i can see how you thought that was a personal attack on you... which it was not, i dont do subtile digs i am alot more direct when on a attack, sure someone here can vouch for that.... either case im sorry my writing struck nervs but i do still stand by my words. and, Jason Dexter its cool, it dosnt bother me im enjoying this.... i supose i do alot of shock factor, ya know ruffle feathers.... i do alot of consultant work these days and know everything i say to clients only gets like 50% taken in... so you go the extream ruote and a nice middle ground gets found.... like having a blog for a online shop is cool, im not really saying its not but taking on-board what i said (remebering people dont do everything advised) then hopfully there would be more posts about stuff than directly about products.
-
Blog linking to your website
actually yes it is. its the first update to spam fighting in a algorythmic sense in almost ten years... call it a hunch based on a decade in the field. but "The company I'm working for have me adding content to a blog, they've asked me to talk about a product or category, and pick keywords, and link back to our website (e-commerce website)." dosnt fill the heart with a sense of qaulity, a blog to promote a e-commerce shop that the writer, as a non seo is told to focus on keyword density.... which you can deduce the content is not qaulity.... you can not write somthing of qaulity while a focus on keyword density is paramount. granted this bit is very either paranoid or insightful, Gogole translate (which they closed the public API) has given them a deep understanding of language, now stop words can have context in a algorhymic sense... structures of naturally formed senstences can be worked out and they could work out what is written for users and what is written for them.... call me a crazy if you like, but its not wise to think that that many PhD students wouldnt work out how to fight spam in the end.... its obvious to a human but computationaly hard work but thanks to mores law time is all you need to solve that. having a blog for the purpose of promoting a single website is spam, or heck a blog filled with affiliate links in posts is spam.... its content written for another purpose than publishing a good content piece on a certain subject for the blog.... its a very subtile diffrence in intent that results in a massive diffrence to writing.
-
Blog linking to your website
i dunno im fond of the method, it works... but i would not like to read that blog or any blog whos purpose is to market the owners other website.... mark my words, one day... google will update the algo and push these sites down the rankings... its a dead cert i should put money on it!... untill then it will work tho and you can fill the internet with more crap (although with the pengin update that ship might have sailed allready... YaY! )
-
PHP class modifiers
Think the only time final would be handy is for Library writers, so you can make sure some functions dont get overwritten by child classes and other developers and not use private.... but using absract and final would be extreamly odd as Jock says, Also google did this guide years ago, which basicly has 3 valid points Avoid writing naive setters and getters Don't copy variables for no reason Avoid doing SQL queries within a loop https://developers.google.com/speed/articles/optimizing-php "- final can be used for class properties? (why?)" also checkout this section of the php manual: http://uk3.php.net/manual/en/language.oop5.php
-
Need PHP Script for spam detection
not sure, generally people block spam before it hits the DB rather than analyzing the contents of the text and you allready know about akismet... so you should spend some time googling for some stuff... it is what every here would do anyway.... google has the answer, always, if it dosnt you dint ask it the right question.
-
pay from credit cards (visa electron, master card) script
sure, my skype is paul.lashbrook
-
Addition and Insert
indeed, but thats not what i was talking about. if you look at the OP the code is using the old way of dealing with mysql which throws a notice a variable asignment in condition statment or somthing like that. the original post has the use of $row which was asigned for the while loop and using it outside of the while loop that is bad code... using global variables is sooo php4, leads to sloppy hard to debug and tightly coupled code thats a mare to unit test. $array = array(array('one'),array('two')); foreach($row as $v){ } var_dump($v); in the code sample above var_dump($v) would echo array(0 => 'two')... which is odd behaviour in my world and not obvious that would happen making it worth noting and is what i was pointing out, did not mean assigning a variable within a loop which is what you took it as evedently.
-
Addition and Insert
thats setting a variable in a loop, i was talking about using the variable defined for iteration outside the scope of the code block.... very diffrent things.
-
pay from credit cards (visa electron, master card) script
what you want will cost you at least £100/mo and a few hundred to set-up your merchant account with your bank. also avoiding 3D-secure is not somthing you should do, and by bypassing it using Moto trans types will just result in your expensive merchant account getting terminated. also the soultion for you depends on what software runs your cart... theres a new service to avoid PCI complience from a company called oGone... the form basicly posts to there secure servers, you get a code back and you use that to process the card meaning you dont have to be PCI compliant as at no point to card details even go through the ram.
-
Addition and Insert
as the guys say use code tags, removing the spaces [ code ] some code [ / code ] it makes your code look nice to everyone, and makes it easier on the eye. the reason it wasnt working before is because $row is only avalible to use within the while.... while(){ $row; } somthing to remember is when you use a foreach loop the "$row" variable will be avalible after the loop with the data from the last iteration... can lead to odd results with some peoples code... not tested that in php 5.4 yet tho.
-
Really fed up with spam
i would automate it with crons if i were you.
-
How to transfer a Feedburner feed into raw XML?
your browser makes it look nice, press CTRL + U
-
Cookies
thats cus this is the most stupid law ever and they know it! this one was made by people with no understanding of how the technologie works. only that "hacking", "malware", "spyware" are all bad things that cookies are involved with... somehow... maybe? in reality this is Microsofts fault for not securing there platform and allowing there products to live with known security bugs for fecking ages! end result is a market full of slow, insecure and dangrous products mixed with a very low general user understanding which is a massive invite for govermental regulation to keep the uneducated population calm to win votes.... It's because of the above im a code nazi, imagine if steve jobs knew how to program... thats how annoying i can be, it's so important that people take put on the whitehat mentality and a little pride of their craft, a concepts thats dieing slowly... in the end.. blackhat activity in what ever field will only stunt growth and give us more laws like the EU's stupid cookie law... </rant>
-
Really fed up with spam
i wouldnt block if one email is used to much as it would be stopping legit people who just want to use the system alot, adding a time value so like 2 submitions within 30 seconds... but its better to add a pause to the users session than the below. SELECT COUNT(id) FROM banners WHERE email = '' AND timestamp >= (time()-60); and for the searching, im delibratly not telling you, so that you google search how and learn... really the php manual is legandary, if the page dosnt say what you need its likley the comments will! http://php.net