redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
try a different server/host. even if your site was poorly coded (not saying it is or isnt) it shouldnt really run that slow. seems more like the response times rather than the file sizes.
-
Dreamweaver 8: Concealing PHP Libraries
redbullmarky replied to azunoman's topic in Editor Help (PhpStorm, VS Code, etc)
sorry for late reply, just noticed this one... all you need to do is set up a LOCAL public_html in your site folder and omit the 'host directory' when you set up your site. most often, the root of your site when you set up a site without a host directory is one level above your public_html. my local structure tends to be like: -+local project folder ---+public_html -----+images -----+css ----- index.php ---+scripts ---+uploads only issue i have when working in this way is that testing scripts outside of your DOCROOT cant be done by calling the scripts directly (ie, preview in browser). I tend to work within the docroot during development, with the intention of moving the files outside at a later stage. Also, preview in browser will add 'public_html' into the URL, but easy enough to workaround by keeping your browser open in the background and refreshing it when you want it checked. -
an excellent read if you're looking for recommendations for Rails-inspired PHP frameworks: http://www.h3rald.com/articles/view/rails-inspired-php-frameworks/
-
[quote author=448191 link=topic=113052.msg460392#msg460392 date=1162277309] [quote author=Skatecrazy1 link=topic=113052.msg460352#msg460352 date=1162265587] what in hell are you guys talking about... ? web 2.0? [/quote] You didn't hear? Microsoft released a new version of the Internet! Unfortunately, it isn't supported by Mozilla, so we will have to start using Internet Explorer again... :( [/quote] LMAO well in fact, we laugh now, but would anyone put it past them given a chance?
-
harddisk with links
-
[quote author=ober link=topic=113173.msg460153#msg460153 date=1162237591] They have moderators... and most often your changes will be reverted within minutes if you really get out of hand. [/quote] depends on the article. if it's a popular one, or in the news, then no way will you get away with your changes for too long. however, if it's not as common an entry, it's not uncommon for changes to remain there for months - well, at least until one of the previous contributors checks back or someone comes along and reads the whole thing through again. i have to say, i have a lot of time for wikipedia - people have a pop for its "inaccuracies", but i guess even the tabloid newspapers are full of junk, so no real difference. but as a quick lookup and for some good laymans descriptions of technical terms, it's a good start. but sometimes the demon inside of me has prevailed lol
-
The Super Cool Mostly Official Frankenstein-Code Game Thread!
redbullmarky replied to .josh's topic in Miscellaneous
lol an "Insult" generator and a person that eats animals and chucks up - beats "Hello World" any day -
List of all countries, states and its cities
redbullmarky replied to fiddy's topic in PHP Coding Help
not really the right place for this thread, but still: http://www.maxmind.com/app/geolitecity that should do you. tis pretty huge and takes a chunky amount of time to get it into a DB, but by far the best (and free) one i've found so far. as for the states, i needed another file for this, but i dont have the link. do a google search for 'FIPS' and you should be able to dig up something, then use mysql to perform LEFT JOINS to match the cities to their respective county/state. [b]edit:[/b] the FIPS info is on the same site as the link i gave you. cheers -
The Super Cool Mostly Official Frankenstein-Code Game Thread!
redbullmarky replied to .josh's topic in Miscellaneous
oops. this line: $verbs = array('dislikes', 'sits on', 'licks', 'sucks', 'looks like', 'does', 'discusses the pros and cons of Web 2.0', 'loves', 'caresses', 'slides onto', 'hates', 'kisses', 'learns PHP with', 'has an AJAX interface with'); should be 'discusses the pros and cons of Web 2.0 with' -
this is where i first went when learning about dynamic RSS: http://tiffanybbrown.com/2005/12/22/dynamic-rss-feeds-using-php-mysql-and-apache the above method basically works by discuising a PHP file as an XML/rss file by sending the appropriate headers. now that your "XML" file is actually a PHP file, you can add what you like to it. as for logging the IP, simply change the above code to suit your needs to store the value of $_SERVER['REMOTE_ADDR'] in your DB/log file.
-
[quote author=Amazing Science link=topic=111668.msg459864#msg459864 date=1162201757] One more thing: is there any way I could have a statistic to know how many people have my RSS feed in their feed readers? [/quote] two ways i can think of: restrict it to members or feed it via a PHP script using header function to send the correct MIME types. i personally use the latter, which as well as providing the feed, also allows you to log each request just like a page request - IP address, etc.
-
Wikipedia "Vandalism": has anyone done this before? Occasionally you see a post on Wikipedia regarding a band/rockstar/sports team/etc that you either admire or hate, but you feel that the article is misrepresenting what you think. Have you ever "edited" the post in such a way that may be construed as a little 'naughty' to get across your own opinion? have you ever just totally wiped out an article and replaced it with a single, derogatory word or phrase? please give details...i saw it on a YouTube clip of a US chat show once, so wondering how many people out there purposely take advantage of the little voices in our head when we visit Wikipedia that say "edit me, edit me, please make me derogatory" (yeah, it rhymes - not intentional)
-
The Super Cool Mostly Official Frankenstein-Code Game Thread!
redbullmarky replied to .josh's topic in Miscellaneous
dirty little sod, aint he?! BTW, can we standardise spaces/tabs? when it gets really tempting to try this out in our fave text editor, it doesnt always work for some reason unless the tabs/spaces are deleted+replaced. no idea why... -
The Super Cool Mostly Official Frankenstein-Code Game Thread!
redbullmarky replied to .josh's topic in Miscellaneous
<?php $relatives = array('mother', 'father', 'sister', 'brother','uncle', 'auntie'); $verbs = array('dislikes', 'sits on', 'licks', 'sucks', 'looks like', 'does', 'discusses the pros and cons of Web 2.0', 'loves', 'caresses', 'slides onto', 'hates', 'kisses', 'learns PHP with', 'has an AJAX interface with'); $animals = array('dogs', 'cats', 'horses', 'birds', 'giraffes', 'elephants', 'hippos', 'hamsters', 'gerbils', 'monkeys'); function insult($secondary_person) { global $relatives; global $verbs; global $animals; $r_size = sizeof($relatives) - 1; $v_size = sizeof($verbs) - 1; $a_size = sizeof($animals) - 1; $r_rand = rand(0, $r_size); $v_rand1 = rand(0, $v_size); $v_rand2 = rand(0, $v_size); $a_rand = rand(0, $a_size); $insult = "Your {$relatives[$r_rand]} {$verbs[$v_rand1]} $secondary_person and {$verbs[$v_rand1]} {$animals[$a_rand]}"; return $insult; } class Greeting { function Greeting() { echo "Hello World!"; } } interface Actor { public function speak(); public function meet($person); } class Franky implements Actor { private $person; public function meet($person){ $this->person = $person; } public function speak($insult_them = false){ if($this->person == null){ $greet = new Greeting(); echo '<br />'; } else { echo 'Hello '.$this->person.'!<br />'; if ($insult_them) { echo insult($this->person) . '<br />'; } } } } $h = new Franky; $h->speak(); $h->meet('Jesus'); $h->speak(true); ?> edit: i am not responsible for the output of this sample program. if you find it offends, then blame PHP, not me. everything in the above code is clean, non-offensive English. -
The Super Cool Mostly Official Frankenstein-Code Game Thread!
redbullmarky replied to .josh's topic in Miscellaneous
<?php class Greeting { function Greeting() { echo "Hello World!"; } } $greet = new Greeting(); ?> -
[quote author=tomfmason link=topic=113052.msg459596#msg459596 date=1162146335] [quote author=redbullmarky link=topic=113052.msg459415#msg459415 date=1162113467] "Web 2.0 expert" [/quote] LOL.. I really hate that saying. Web 2.0 is about the dumbest thing I have ever heard.. [/quote] yeah. it's not the term itself, its the bandwagon that people jump on. "that's web 2.0, that is! oooh look at that AJAX!". reminds me of really old people at the bus stop (excuse the ageism here, but i'm talking facts - at least in the UK lol) - every time you here a story on the news with a "media-coined" term, guaranteed you hear the conversations at the bus stop like: "oooh, all those weapons of mass destruction!" "oooh, my great grandson taught me to surf that information super-email thing" i'm sure you get what i mean without elaborating further with more examples. basically its all about bandwagons and being sheep, a knowledge one-upmanship, and it's annoying ...
-
are you using some sort of free host supported by ads? this: http://www.top66.ro/voted/13926/3731 is the "adult" page that popped up. ok, so its not a pure page of porn - but still. i didnt go to that site, i went to your site - to be amazed by science, not adult personals. if i recall, all i did was click on the 'home' link in your nav. seems to happen randomly rather than all the time. i wouldnt be surprised if the sheer amount of ads you've crammed into the page is the reason for such a slowdown. i'd love to critique your site - but out of principle, not when i'm getting popups of all sorts all over the place. get rid of that javascript popup (vote for us, etc). for that to appear every time the home page loads is annoying.
-
you could do what everyone is doing these days for no reason: add a pointless AJAX interface, some chunky fonts, port it to Ruby on Rails and claim youre a "Web 2.0 expert" ;D
-
I need model Design spec and Function Spec
redbullmarky replied to sivanath.nagendran's topic in Application Design
Google is your friend: http://www.google.co.uk/search?hl=en&q=functional+design+spec+template http://www.google.co.uk/search?hl=en&q=design+spec+template gives: http://www.computing.dcu.ie/~roconnor/modules/ca326/fspec.html and http://www.cmcrossroads.com/bradapp/docs/sdd.html as examples. -
Nooby wants to make a site from Scratch
redbullmarky replied to eXpired's topic in Application Design
might be worth taking a look at the tutorials on the main site: http://www.phpfreaks.com . what you're asking is very general as it requires you to get a grasp of various different things, not just PHP - as you stated. follow the tutorials until you understand them - constructing a website from scratch when you're unsure of what you need is going to be a pain in the arse for you if you dont understand what you're trying to do or what you need to use other than "i want to build a website." good luck -
pretty much got it in one. forming these URL's isnt restricted to just being formed by the DB, but is definitely the common way. in the case of message boards/forums, etc, this is the case, and normally the id (eg, forum_id, thread_id, etc) relates directly to the primary key of a database record (because it's unique).
-
the large font used for the headers is 'Georgia'. have a look at their CSS, should give you an idea of the sizes/fonts used straight from the horses mouth: http://static.viacomlocalnetworks.com/css/screen.css
-
your best bet is to pop 'css layout' into google - there are plenty of tutorials that will take you through the basics. most of the learning, to be honest, is how to write valid code and how to transfer from tables to CSS based layouts. your first key thing is going to be the <div> tag. the div tag effectively draws an invisible box/container for you to put other HTML elements within. the div tag can be styled just like any other element, allowing you to have full control over position, colour, font, style, spacing, borders, etc. basic example: [code] <html> <head> <style type="text/css"> #mydiv { border:1px solid #FF0000; width:500px; margin:20px; padding:20px; } #mydiv2 { border:1px solid #00FF00; position:absolute; width:200px; height:200px; left:350px; top:400px; font-size:15px; } </style> </head> <body> <div id="mydiv"> <h1>hello world!</h1> <p>i am div 1</p> </div> <div id="mydiv2"> <h2>wahey!</h2> <p>I am an absolutely positioned div. i have a bit more freedom to roam, as i'm not affected by my neighbouring divs</p> </div> </body> </html> [/code]
-
most definitely the second design, or some form of it. i had a problem with the crest chopped in half, and also the lack of crest in the 3rd, as has already been mentioned - it's almost standard for a school website to have its crest, and in full display. nice job though
-
what gmwebs said to an extent is valid. generally though, URL parameters are used to cause a single page to perform multiple tasks - be it different views, features, pages, etc - i.e, a dynamic page. other forms of user input - post ($_POST) for example - arent really suited to this sort of thing, mainly because they require an action from the user (POSTing a form, in this case). URL's like this one can be performed without this type of action. $_GET = what to get from the server, $_POST = what to post to the server. without $_GET, you'd have an index page, a category page, a forum page, a topic page, plus all the additionals that go with it. i like to personally use $_GET to group together pages with a similar function all into one tidy 'package'. there are other benefits too (development, especially) but these are generally the main ones.