redbullmarky
Staff Alumni-
Posts
2,863 -
Joined
-
Last visited
Never
Everything posted by redbullmarky
-
[!--quoteo(post=359803:date=Mar 29 2006, 09:33 PM:name=SemiApocalyptic)--][div class=\'quotetop\']QUOTE(SemiApocalyptic @ Mar 29 2006, 09:33 PM) [snapback]359803[/snapback][/div][div class=\'quotemain\'][!--quotec--] ....back in the days of 3.1... [/quote] hahahahahahahahaha how bad was that? but revolutionary. like the SInclair Spectrum or Commodore 64 lol. One for the museum. Well ... since talking about my Mac in such a negative sense the other day, i've got things back up and running perfectly. You know what I love about the Mac, aside from all the normal graphics/music power?? Mail. One unified Inbox for everthing, but with seperate folders in it for all your different accounts. If only Thunderbird did that. Masna, youre probably right about my MacDoctor. After all he was a receding chap in his late 30's with a ponytail (whoops) but not only that but he had his hair died pink. Says plenty really. I should have realised.
-
1, because something is wrong with box.jpg (either its format/loading, etc), or box.jpg is a grey box. try loading it seperately just with: [code] $im = imagecreatefromjpeg('/full/path/to/box.jpg'); header("Content-type: image/jpeg"); imagejpeg($im); [/code] 2, no idea. possibly you may consider using imagecreatetruecolor instead of imagecreate, as they look like quite hi-res pictures. 3, everything done overwrites a previous action, just like a painters canvass. so yep - whatever you want on top should be the last thing you actually copy/write. 4, even tho you didn't have a 4th question - nice pictures. hope that helps Cheers Mark
-
Hi Ray, Files i upload via dreamweaver are given one user name, generally my 'ftp' username. files on the server created with either fopen or move_uploaded_files are owned by 'apache' your description is a little mindblowing but kinda makes alot of sense (within the bounds of my knowledge, anyway). have you put any of your points into practice in the past with php scritps using functions such as 'chmod' or 'ftp_chmod' ?? Cheers Mark
-
Hi Ray We're on Apache here on Fedora. We do not own the server but it is a Virtual Private Server, so we have full access to anything. Normally I just rely on Windoze where it seems like you don't need permissions for anything, but Linux is proving to be a different monster altogther. I'm getting the idea that the script needs to run as a different user, as opposed to changing the ownership of every file and directory i have, but i'm stumped as to how. I know what functions i WOULD use, but they give me permission problems. I didnt think that a script running on the server would need extra permissions, etc, to do stuff on the server. Cheers Mark
-
[!--quoteo(post=359620:date=Mar 29 2006, 01:01 PM:name=steviewdr)--][div class=\'quotetop\']QUOTE(steviewdr @ Mar 29 2006, 01:01 PM) [snapback]359620[/snapback][/div][div class=\'quotemain\'][!--quotec--] As Mark said - your uploads - awfully dodgy. Im glad your not on my server :@ [/quote] it's MUCH worse than first thought too, and the problem extends to his other site in his signature (which is partially about internet security), but i've PM'd him about it instead.
-
[!--quoteo(post=359607:date=Mar 29 2006, 11:33 AM:name=roseplant)--][div class=\'quotetop\']QUOTE(roseplant @ Mar 29 2006, 11:33 AM) [snapback]359607[/snapback][/div][div class=\'quotemain\'][!--quotec--] I changed around some of those pointers you mentioned - restyled the ads, moved the search box, little bits and pieces. As for the nav buttons, I'm not sure what to do with them. I need them as plain text links for the search engines. Is this an improvement? I'll be away for about a week so won't be able to read your iron-fisted critiques until I get back :) but hope to see something I can improve on! [/quote] okay well something for you to read on your return.... heading in the right direction. you've free'd up some space that you can now use a little better, however you can go further. 1, lose the google ad directly above your 'Dublin Hotel Guides Ireland' header. this will let you lift the content up even more. 2, The 'Find Hotels In Dublin' search form and 'Todays Featured' panel. you now have whitespace between those that you could shrink a bit, bringing even more content into the page from 'far below' 3, as for the nav, i'm 99% sure that putting some CSS rollover effects wont effect Search Engines at all. see the bit at the footer of your page that says: Resources | Dublin Hotels | Site map ?? you could add the nav as plain links here, and go for your life in styling the top links in some manner. 4, some parts still need a 'home', such as your entire top section/logo, etc. 5, how about taking the 'no results found' even further? how about if it said "No exact matches found, however maybe you'd consider these hotels, also in Baggot Street". if for example they've chosen 'hostel', then order the results from lowest to highest Rating. if they choose 5-star, order them by the next best hotel, etc. a "Nearest Match" instead of "Nothing here at all" system. all it'll cost you is an extra check and an extra query on your search results page. but heading in the right direction. good luck!
-
Hi again all I had a problem recently with an 'updater/installer' script i'm trying to implement, where I was looking of ways to get a PHP file from a remote location in it's full, text format and update it on another server. For the sake of keeping things easy to understand, remote server (where the up to date files i want) is called 'R', and the local server that needs updating is 'L'. I can now get the file successfully from R using a script on L. the script on L displays the PHP file in its text format perfectly. Now my problem. I need to move this file that L gets into its correct place on the server. If I chmod a test directory to give write permissions to all, then I can comfotably use fopen/fwrite, etc to put the file there. however, the file that I get from R needs to replace a file on L totally. Without giving write access to ALL the directories on L, I do not know how to go about this. I DO NOT want, for obvious reasons of security, to write access to all of L's directories and scripts. eg: i have a replacement for this file: [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] /public_html/search/index.php [/quote] but the permissions, for obvious reasons, are set to read/execute, NOT write. i've tried using php's 'chmod' on certain directories/files before writing to them in the hope that i can then simply 'chmod' them back to read only afterwards, only the 'chmod' fails due to permission problems. So ... getting to the point ... how can a script on L force the overwriting of another script on L, to replace it, whilst still leaving all the permissions as they should be afterwards? I think my biggest problem is that i don't fully understand setting up the files in the first place with 'ownership' or even changing my script so that my script can 'be' the necessary owner. Hope someone can help Cheers Mark
-
[!--quoteo(post=359581:date=Mar 29 2006, 09:42 AM:name=shocker-z)--][div class=\'quotetop\']QUOTE(shocker-z @ Mar 29 2006, 09:42 AM) [snapback]359581[/snapback][/div][div class=\'quotemain\'][!--quotec--] you mean HTML frames? not sure exacly what you mean mate [/quote] you can only do this with Javascript.
-
ok, without writing the code completely: 1, create an image large enough for both images (imagecreate) 2, open picture your first picture (imagecreatefromjpeg/gif, etc) 3, place picture on canvass created in step 1 (imagecopy/imagecopyresized, etc) 4, repeat steps 2 and 3 for second picture, or however many pictures you want 5, send the headers: header("Content-type: image/jpeg"); 6, out the image created in step 1 (imagejpeg) ok sod it, here's an example: [code] $canvass = imagecreate(800, 600); $im1 = imagecreatefromjpeg('mypic_one.jpg'); imagecopy($canvass, $im1, 20,30,0,0,100,100); $im2 = imagecreatefromjpeg('mypic_two.jpg'); imagecopy($canvass, $im2, 200,300,0,0,120,70); imagedestroy($im1); imagedestroy($im2); header("Content-type: image/jpeg"); imagejpeg($canvass); [/code]
-
Why Can't I Open PHP Files on My New Mac?
redbullmarky replied to Devious Designs's topic in PHP Coding Help
[!--quoteo(post=359434:date=Mar 28 2006, 10:10 PM:name=Devious Designs)--][div class=\'quotetop\']QUOTE(Devious Designs @ Mar 28 2006, 10:10 PM) [snapback]359434[/snapback][/div][div class=\'quotemain\'][!--quotec--] redbullmarky, I can access localhost. I just can't run SQL [/quote] ok so you can't run SQL now, so i'm guessing that your PHP problem is ok now? with SQL, i think that to create databases you need to log in as root user: mysql -u root -p if you've not set the password for root, then when it asks, just press enter. if it works, youre in and you can then set your root password then start your 'create database' stuff. -
[!--quoteo(post=358706:date=Mar 27 2006, 12:54 AM:name=xam)--][div class=\'quotetop\']QUOTE(xam @ Mar 27 2006, 12:54 AM) [snapback]358706[/snapback][/div][div class=\'quotemain\'][!--quotec--] Where ? [/quote] ?? anyway, open your Javascript Console in FF (tools menu). you may need to clear it as some ads on some sites fill it full of rubbish...try out your site....what errors/warnings come up in the JS Console?
-
not too bad. but as we're in 'Website Critique', i reckon being nicey nicey isn't what you're after. 1, your header/logo is huge and along with the nav, takes up half of my browser window. i hate the scrollbars at the best of times, but when they only appear due to an oversized banner, that's a different moan altogether. 2, I went to your site expecting lots of script downloads and tools, as the name would suggest. Instead what I found was a splash page of adverts with a bit of your content squashed in. 3, I just sent you a message via the 'contact' page. Hope you liked my 'alexa toolbar' uninstall program (an EXE file), because that's exactly what your form accepted. now...if only i could find out (or guess) where you stored those files....you get the message. 4, as you've styled the input boxes on your content page, give them each a little space to breath 5, FAR too many google ads. ok, i'm gonna give you a little idea here, and apologies if UK hosting costs are much less than wherever you are based - how serious are you about this project? ok, we all love to make money, but i think (IMO) that google adsense is the biggest crock off plop alongside IE. not only (again, IMO) are people becoming immune to the ads and ignoring them totally, but a) people who have JS turned off have a big ugly blob of whitespace to look at and b) if you're that serious about hosting a site for professionals, etc, then you can find alternative ways of making money. my dinnertimes site shares a server with my company site and various other stuff. not a single advert in site, yet a couple of bits and bobs and a bit of a push has paid for my hosting costs (£25.99+VAT per month) for a year. 6, want a free pagerank on your site? "nope, cos you don't use it on yours". 7, your banner. i love being able to click the banner to go 'home'. link your banner to your home page. it's really not a bad site at all. my biggest beef is with unnecessary adsense. the banner ad (image) across the bottom is a) out the way b) not intrusive and c) doesn't pretend to be your nav in a place where i expect to find your nav, like the adsense ones are. Hope that helps Cheers Mark
-
Understanding PHP/MySQL relationships & the posiblities
redbullmarky replied to titangf's topic in PHP Coding Help
Hi I'm not totally sure why this particular thread is hidden away in the Misc forum, but here you go: [a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=58799\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?showtopic=58799[/a] There are two 'bibles' that I have used personally: 1- "php and mysql development" by luke welling/laura thomson 2- "DHTML and CSS" by Jason Cranford Teague. whilst the last one has naff all to do with PHP, it really has helped me get my foot in the door with 'dynamic' sites especially new stuff like AJAX. both are simple to understand but neither are patronising or 'beginner' in the way they teach. so whatever level youre at they're extremely good. -
[!--quoteo(post=359389:date=Mar 28 2006, 07:28 PM:name=Taguan)--][div class=\'quotetop\']QUOTE(Taguan @ Mar 28 2006, 07:28 PM) [snapback]359389[/snapback][/div][div class=\'quotemain\'][!--quotec--] i hope somone can help me . [/quote] toplay already did. there's not one single session/header problem that i've not (or anyone else after some careful checks) has not been able to eliminate after carefully following the advice on the link provided. post your code above and including your 'session_start()' line
-
(mods - apologies for bumping a thread in a php forum that should be in JS) joecooper, the code I provide and also what thorpe provided does work, but how you use it might be the problem. answer me this - what did you try the 'onclick' method on? an <a href .... > link or a button? please can you post the code that you tried.
-
Why Can't I Open PHP Files on My New Mac?
redbullmarky replied to Devious Designs's topic in PHP Coding Help
which part of your 'War & Peace' did you want us to read first? lol i may have mentioned this in an earlier post in this topic, but: whip open Safari. type in: [a href=\"http://localhost\" target=\"_blank\"]http://localhost[/a]. 1, if it worked -> great, you've just learnt how to walk. now you can learn to run 2, if it didnt work, then it's not a surprise that none of the other stuff works. first things first. open your system preferences, then 'Sharing' (i think it is) and make sure you have 'Web sharing' or whatever it is checked. try again. -
[!--quoteo(post=359362:date=Mar 28 2006, 06:41 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Mar 28 2006, 06:41 PM) [snapback]359362[/snapback][/div][div class=\'quotemain\'][!--quotec--] Thanks does anyone have a working version of this? [/quote] Hi i have this implemented in a different way attached to a form button, but it will work with links (<a>), etc too: [code] <input name="Submit" type="submit" value="Delete" onClick="return confirm('Are you sure you want to delete this record?');" /> [/code] but thorpe's right, this is more of a javascript thing not php hope it helps tho Mark
-
you mention textarea, so i can only assume it's text you want to store in the DB. the TEXT type, as opposed to BLOB, is more than capable of storing lots of text, even as far as an entire text file. cheers
-
[!--quoteo(post=359317:date=Mar 28 2006, 04:44 PM:name=neewah)--][div class=\'quotetop\']QUOTE(neewah @ Mar 28 2006, 04:44 PM) [snapback]359317[/snapback][/div][div class=\'quotemain\'][!--quotec--] Heh who can blame the MS Web Coders?? It is a stupid margin error in IE! [/quote] all i can say is thank god for firefox. hopefully it'll get much bigger too and teach those M$ lot not to get so complacent... but yep...pat on the back and a pint of beer if i ever meet the chap that's cheeky enough to do that.
-
2 questions... using a .jpg to disguise a .php
redbullmarky replied to mheinjr's topic in PHP Coding Help
[!--quoteo(post=359339:date=Mar 28 2006, 05:27 PM:name=mark383)--][div class=\'quotetop\']QUOTE(mark383 @ Mar 28 2006, 05:27 PM) [snapback]359339[/snapback][/div][div class=\'quotemain\'][!--quotec--] THank you, I am at work right now and cannot test any codes. Now that I am briefly looking into this wouldn't I just be able to use Imagejpeg(picture.jpg) to have it send a image when i use: <img src="http://<my server>/test3.php/picture.jpg"> [/quote] whoops lol i was only playing around with this yesterday too...duh! Mark, you're spot on. yes you can do it this way. Providing you send the right headers first, you can pretty much have your test3.php as something like: [code] <?php $file = all the stuff from a previous post to get the filename. header("Content-type: image/jpeg"); imagejpeg($file); ?> [/code] please note that filenames passed to 'imagejpeg' are not URL's (depending on your setting) so you'll need something like: /this/directory/public_html/images/mypicture.jpg instead of [a href=\"http://images/mypicture.jpg\" target=\"_blank\"]http://images/mypicture.jpg[/a] -
2 questions... using a .jpg to disguise a .php
redbullmarky replied to mheinjr's topic in PHP Coding Help
http://<my server>/test3.php/picture.jpg is returning text (ie, when you type it, you get: The image name is: picture.jpg. when you put it in <img src="">, the browser expects image data to be returned, not text. to get an image displayed using this method, your test3.php needs to use the GD library to do the following: 1, imagecreatefromjpeg to open picture.jpg 2, send the headers 3, output the image. look at 'imagecreatefromjpeg' at [a href=\"http://www.php.net/imagecreatefromjpeg\" target=\"_blank\"]http://www.php.net/imagecreatefromjpeg[/a] to get an idea of what you maybe after. cheers Mark -
[!--quoteo(post=359211:date=Mar 28 2006, 11:48 AM:name=lpxxfaintxx)--][div class=\'quotetop\']QUOTE(lpxxfaintxx @ Mar 28 2006, 11:48 AM) [snapback]359211[/snapback][/div][div class=\'quotemain\'][!--quotec--] Haha, I guess their staff were bored. [/quote] it does make you wonder tho, doesn't it. how many companies have 'hidden' little things within their HTML or CSS code that the public just weren't meant to see...
-
[!--quoteo(post=358691:date=Mar 27 2006, 12:14 AM:name=roseplant)--][div class=\'quotetop\']QUOTE(roseplant @ Mar 27 2006, 12:14 AM) [snapback]358691[/snapback][/div][div class=\'quotemain\'][!--quotec--] lol I was just running some tests at that moment. funny you checked just in that < 1 minute timeframe. [/quote] my very first impression wasnt that great, however after looking for a little longer, i'm noticing something a bit better that needs a bit of moving around/styling. it seems you've gone to a bit of effort styling your green boxes, pictures and icons, and as individual elements, they look quite nice. however, nothing really seems to have a 'home'. 1, the nav is written in plain text directly onto the page. 2, in fact, the whole top section (logo and nav) could do with some work - give them somewhere to sit inside, rather than have them pasted directly onto the plain white background. 3, where you have your light green bits within a box (border), it looks great. where you have the green with no border, it just looks a bit nasty and hard on the eyes. 4, there is a lot of content 'off the page' that i have to scroll to, but there is also alot of whitespace at the top which could be utilised alot more. for example - see you box "Find a Hotel in Dublin"? - there's space to the left and right of that which can't really be used for much. however, if you move the box to the left instead of having it centred, all of a sudden you've got all this whitespace that can be then put to good use to bring some of the 'off page' content into the page a bit. 5, on that note - no search results = blank page. a message such as 'no results found for your query...' goes along way. hope that helps, but otherwise it's a good job! Cheers Mark
-
Mark Grainger, male, 26.... I remember this exact question being asked when doing Computer Studies in college. One response to 'why arent many women into computer programming?' was 'Have you ever tried to use a computer, hair straigteners and put your makeup on at the same time?' A little unfair, mind, as I know for a fact that at least two of the 4 girls on my course have gone on to programming companies for a living, whereas only one male as far as I know has gone on to do programming/web design full time. I started on a Spectrum typing in BASIC code from books and magazines, prob back in 86/87. Gave up totally in 98 after college as I was bored. Got Into web design only about a year and a half ago, picking up HTML and PHP at the same time, as I needed to make a company website instead of shelling out nearly £5000... Happily unmarried, and the girlfriend only shares my enthusiasm for Web stuff when taking the p!ss out of my PHP/CSS/XHTML books.