Join us at IRC!
Things are more like they are now than they have ever been before. - Dwight D. Eisenhower
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 39
Web Spiders: 16
Guests Online: 35
Members Online: 4

Registered Members: 70180
Newest Member: RAWRFEARME744798
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Page 4 of 4 < 1 2 3 4
Author

RE: First website ideas

NotMyFault
Member

Posts: 68
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 04-01-10 20:49
.t35.com don't support databases for their free accounts :(
css is w3 valid but the actual pages aren't due to bad coding by the .t35.com ads... :angry:
Just the new section left and I think I'll need to learn XML for that because I want to pull RSS feeds in from other pages and post those articles straight to the page. Any thoughts on how to do that?
Guestbook is finished. Thanks to everyone who helped with the css! Check it out and if you find anything wrong with it please tell me!

Now that I think about it, I've learned a lot in the last like week! A lot of PHP, CSS and a couple of other things as well! Thanks especially to Wolfmankurd, Moshbat and Define for helping me with just about everything I asked!




Edited by NotMyFault on 04-01-10 22:18
Author

RE: First website ideas

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 05-01-10 00:39
NotMyFault wrote:
1) I'm trying to assign an id to each name and comment and name but I have no idea how to...

... Store an id with the name and comment? Find the last id in the comments "storage", then increment it by 1 for the new one. It's a poor man's auto_increment.

NotMyFault wrote:
2) When I get the id thing working how would I be able to arrange the comments and names like this:
___________________________
1|NotMyFault|comment |
_|__________|______________|
2|whoever |haha you sites|
| |awful!!! |
_|__________|______________|


CSS

.id, .name, .comment { float:left; padding:5px 10px; }
.id { width:50px; }
.name { width:150px; }
.comment { width:350px; }
.clearFloat { clear:both; }


PHP

/* Presuming that $comments is an array containing arrays with keys 'id', 'name', 'comment',
such as array( array('id'=>1, 'name'=>'me', 'comment'=>'hello'),
array('id'=>2, 'name'=>'you', 'comment'=>'hi'), etc. ) */

foreach ( $comments as $c ) {
echo '<div class="id">' . $c['id'] . '</div>' .
'<div class="name">' . $c['name'] . '</div>' .
'<div class="comment">' . $c['comment'] . '</div>' .
'<div class="clearFloat"><!-- x --></div>';
}


Yes, I was in a giving mood. :)


If you need to contact me, send me a PM. I will read and/or respond in time.
Author

RE: First website ideas

NotMyFault
Member

Posts: 68
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 06-01-10 14:54
Thanks, I should proberbly switch to one of them!
So now that the guestbook's finished, how can I pull rss feeds from one page and display them on my website?
I've looked so much but I can't find anything!




Edited by NotMyFault on 06-01-10 14:56
Author

RE: First website ideas

AldarHawk
The Manager



Posts: 1662
Location: Canada
Joined: 26.01.06
Rank:
God
Posted on 06-01-10 16:05
What have you looked up for RSS feeders?


I(don't)See Just ask Yahoo!Taboo! http://www.erikwestlake.com
Author

RE: First website ideas

yours31f
Second to one



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Satan
Posted on 06-01-10 21:59
oh, and another free host is ulmb.com, they have 5 gigs of space, 500 gb bandwidth, 3 mysql databases, guest accounts, sites stats. and alot more.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.



yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: First website ideas

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 07-01-10 12:55
NotMyFault wrote:
So now that the guestbook's finished, how can I pull rss feeds from one page and display them on my website?
I've looked so much but I can't find anything!

Uh huh...

Use cURL to get the RSS feed; using file functions is possible, but it's a security risk. Here's an example from the cURL site: http://curl.haxx.se/libcurl/php/examples/simpleget.html

Only change you'd make to that is to set a variable equal to the curl_exec() line. That variable would contain the feed.

Then, look at some "PHP SimpleXML examples". You can Google that one.


If you need to contact me, send me a PM. I will read and/or respond in time.
Author

RE: First website ideas

AldarHawk
The Manager



Posts: 1662
Location: Canada
Joined: 26.01.06
Rank:
God
Posted on 07-01-10 17:52
why in the world would you use cURL for RSS? Why not just use SimpleXML?


I(don't)See Just ask Yahoo!Taboo! http://www.erikwestlake.com
Author

RE: First website ideas

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 08-01-10 12:56
AldarHawk wrote:
why in the world would you use cURL for RSS? Why not just use SimpleXML?

Couldn't remember if simplexml_load_file() pulls files remotely without the allow_url_fopen ini option set. So, I just suggested the next best (2-step) thing: using cURL to retrieve the XML file and using simplexml_load_string() on the response.

Edit: Yes, it appears that simplexml_load_file() requires the allow_url_fopen ini option to function on remote urls. Found a nice little link that basically echoes this post and my previous one, except is longer and gives more code. :p

http://forums.oreilly.com/content/Head-First-PHP-MySQL/2959/Yikes-simplexml-load-file-is-failing-/#entry9149


If you need to contact me, send me a PM. I will read and/or respond in time.

Edited by define on 08-01-10 13:03
Author

RE: First website ideas

NotMyFault
Member

Posts: 68
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 08-01-10 16:53
Right so XML will be learned by me in the coming days!
I'm looking into creating a session/cookie for the guestbook to stop spam and the likes but they are hard to learn :whoa:!!!
Any other methods I could implement to stop spam or that?
Thanks for yere help with the rss feeds


Author

RE: First website ideas

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 09-01-10 04:35
NotMyFault wrote:
Right so XML will be learned by me in the coming days!

Good. It's useful to know.

NotMyFault wrote:
I'm looking into creating a session/cookie for the guestbook to stop spam and the likes but they are hard to learn :whoa:!!!
Any other methods I could implement to stop spam or that?
Thanks for yere help with the rss feeds

Not sure how a session/cookie would combat spam... but, here's some quick advice on that topic: Forget about cookies in PHP. Just don't bother with them; I doubt you'll ever find a good use for them beyond the whole "Remember Me" aspect of a login form or other such non-essentials for your visitors.

As for the spam prevention, I'd suggest spending a small amount of time looking into Akismet and its API. It's a trusted spam prevention library for PHP.


If you need to contact me, send me a PM. I will read and/or respond in time.
Author

RE: First website ideas

NotMyFault
Member

Posts: 68
Location:
Joined: 23.12.09
Rank:
Hacker Level 3
Posted on 09-01-10 14:38
I was thinking of limiting posts to one per session or something like that...
Ill look into that, Thanks


Author

RE: First website ideas

define
Member

Posts: 201
Location:
Joined: 13.12.08
Rank:
Moderate
Warn Level: 1
Posted on 09-01-10 14:56
NotMyFault wrote:
I was thinking of limiting posts to one per session or something like that...
Ill look into that, Thanks

That's sensible, but a person can clear their sessions easily with Firefox -> Clear Private Data. Maybe put Recaptcha on the form.

Definitely look more into sessions in PHP, though. They're just as essential as database functionality... just remember to keep non-sensitive information in them due to the various attacks against sessions (Thing 1 and Thing 2).


If you need to contact me, send me a PM. I will read and/or respond in time.
Page 4 of 4 < 1 2 3 4
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.