Follow us on Twitter!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Saturday, April 19, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 25
Guests Online: 24
Members Online: 1

Registered Members: 82832
Newest Member: SerMSYS
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

Your avatar

Posts: 68
Location:
Joined: 23.12.09
Rank:
Newbie
Posted on 04-01-10 20:49
.t35.com don't support databases for their free accounts Sad
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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
Code

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





PHP
Code

/* 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. :)


Author

RE: First website ideas

NotMyFault
Member

Your avatar

Posts: 68
Location:
Joined: 23.12.09
Rank:
Newbie
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
Member



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


Just ask Yahoo!Taboo! http://www.erikwestlake.com
Author

RE: First website ideas

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
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.


img259.imageshack.us/img259/3713/sigr.png

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

RE: First website ideas


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: First website ideas

AldarHawk
Member



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


Just ask Yahoo!Taboo! http://www.erikwestlake.com
Author

RE: First website ideas


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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. Pfft

http://forums.ore. . .#entry9149




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

RE: First website ideas

NotMyFault
Member

Your avatar

Posts: 68
Location:
Joined: 23.12.09
Rank:
Newbie
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: First website ideas

NotMyFault
Member

Your avatar

Posts: 68
Location:
Joined: 23.12.09
Rank:
Newbie
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


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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).


Page 4 of 4 < 1 2 3 4