![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2006
Posts: 1,898
|
Looking for a script...
I have a list of 100 urls and descriptions that look like this:
SiteName.com - This is a description of the above site... I want to have a page load and have 20-30 of these links be displayed at a time. Refresh the page and have a different set of 30 links load, all random. Any ideas of a script or snippet of code I could use to accomplish this? I searched google but can't seem to find a script that will display the amount of links that I want it to... Thanks in advance ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
Something like this:
Code:
<?php $ARRAY = array( 'sitename1.com' => 'This is a description', 'sitename2.com' => 'This is a description' ); foreach ( $ARRAY as $URL => $DESC ) print "<a href=\"$URL\">$URL</a> - $DESC\n"; ?>
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Nov 2005
Location: NorCal
Posts: 2,375
|
I love your sig Swish
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2006
Posts: 1,898
|
Thanks Swish!
How do I go about only displaying a certain amount of links at a time tho out of a bigger list? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Code:
<?php $ARRAY = array( 'sitename1.com' => 'This is a description', 'sitename2.com' => 'This is a description' ); shuffle($ARRAY); $counter=0; foreach ( $ARRAY as $URL => $DESC ) { if($counter < 30) { print "<a href=\"$URL\">$URL</a> - $DESC\n"; $counter++; } } ?>
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Feb 2007
Location: Sweden
Posts: 5,650
|
Sounds pretty unnecessary for such a small script.
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.) (Signup with ONLY your Email and Password. You can also refer people and get even more.) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jan 2006
Posts: 1,898
|
Thanks, Ill give that a shot
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
Quote:
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Mar 2006
Location: San Diego, CA
Posts: 1,421
|
__________________
![]() Naughty America - Director of Technology It's a CELEBRATION bitches!! For the hottest content promote Naughty America! ![]() swish at naughtyamerica dot com | ICQ: 226 737 620 | See Who I Am At AdultWhosWho.com! |
![]() |
![]() ![]() ![]() ![]() ![]() |