![]() |
![]() |
![]() |
||||
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: Jul 2003
Posts: 2,109
|
quick php code help...
I want to put alot of urls into the php file, and once php file gets executed it will redirect to those urls one by one... like if I have 100 urls, once php file loads it will go to first url, then once php file get executed again it will load second url, and so on, then once it reaches the end it will start from the begging ... can someone hook me up please
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
Programming King Pin
Industry Role:
Join Date: Oct 2003
Location: Montreal
Posts: 27,360
|
Quote:
![]()
__________________
UUGallery Builder - automated photo/video gallery plugin for Wordpress! ![]() ![]() ![]() ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
still looking
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
bump bump
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
If you are looking to invest a few bucks, icq: 33375924
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed IT Professional
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
|
Here's help. Otherwise, I could make it for you but $$ talks.
__________________
The Best Affiliate Software, Ever. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Quick and dirty way to do it:
Code:
<? $urls = file('URLS.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) $url = array_shift($urls); array_push($urls,$url); file_put_contents('URLS.txt',implode("\r\n",$urls)); header('Location:'.$url); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed IT Professional
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
|
Quote:
__________________
The Best Affiliate Software, Ever. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
|
array + array_rand - and it's all done...
read the manual...
__________________
Make a bank with Chaturbate - the best selling webcam program ![]() ![]() ![]() Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!! PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email: ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Care to point out what it doesn't do?
Takes a list of URLS. Each time the script is loaded, it redirects to the next, and so forth. What did I miss? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Guest
Posts: n/a
|
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Quote:
A real solution would be to use a db or even xml file, but quantum-x has a solution that will work quite well ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
q-x's solution will truncate the url file if the HD runs out of space.
![]() (I know it's a quick and dirty free solution, just pointing out one potential issue.) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
just ![]()
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
Parse error: syntax error, unexpected T_VARIABLE in /www/users/for/multiurl.php on line 3 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Guest
Posts: n/a
|
$urls = file('URLS.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 | |
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: Cheshire, UK
Posts: 454
|
Quote:
Code:
$urls = file('URLS.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); ![]()
__________________
David • 421-179-116 • support [@] adultnetworkuk [.] com
Website Development • Website Hosting • Model Index Software • Website Reviews and Links Hit me up for more information on everything I do. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Guest
Posts: n/a
|
file_put_contents() is a php5 function.
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
... pay woj ...
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Replace the file_put_contents(...) line with this
$fp = fopen('URLS.txt', 'r+'); fwrite($fp, implode("\r\n",$urls)) fclose($fp); |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
Guest
Posts: n/a
|
Code:
<?php if(!function_exists('file_put_contents')) { function file_put_contents($filename, $data, $file_append = false) { $fp = fopen($filename, (!$file_append ? 'w+' : 'a+')); if(!$fp) { trigger_error('file_put_contents cannot write in file.', E_USER_ERROR); return; } fputs($fp, $data); fclose($fp); } } ?> |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Hey Killswitch, is the chick in your avatar some random_unverifiable_one_off_chick or from a program?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 128 bytes) in /www/users/for/multiurl.php on line 6 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
And you can see that free help isn't always so quick... by now you probably could have paid to get a working solution that you didn't have to worry about...
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Why the fuck are you running PHP4 - In one month's time it will have been discontinued for THREE YEARS.
No wonder shit is breaking ;) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#33 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Does each redirect NEED to be sequential? If you do it randomly and there's enough loads (ie enough of a sample) then each URL will receive the same average amount of traffic anyway.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#34 | |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#35 | |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Quote:
If you're out of space PHP will probaby grind itself to death when attempting to even run ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#36 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#37 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#38 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#39 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
Damn, I should have left out a semicolon or two and extorted $3.82 from you.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#40 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Sweet fucking Christ.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#41 |
Confirmed User
Join Date: Jul 2003
Posts: 2,109
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#42 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#43 | |
Guest
Posts: n/a
|
Quote:
I put the code on my dev server and ran it, by the looks of it, when putting the first url to the bottom, it's putting enters in there somewhere.. |
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#44 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
That was my attempt to extort him, shhhh
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#45 |
Guest
Posts: n/a
|
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#46 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
egold ?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#47 |
Guest
Posts: n/a
|
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#48 | |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: RI
Posts: 2,112
|
Quote:
Code:
<!-- var how_many_ads = 3; var now = new Date() var sec = now.getSeconds() var ad = sec % how_many_ads; ad +=1; if (ad==1) {url="http://www.url1.com/";} if (ad==2) {url="http://www.url2.com/";} if (ad==3) {url="http://www.url3.com/";} rotpop=window.open('','rotpop','toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,top=1,left=1,width=790,height=570'); rotpop.blur(); rotpop.location=url; -->
__________________
![]() SUBMIT PORN BLOGS HERE ![]() ![]() ![]() ![]() ![]() ![]() ![]() Now Hiring My network is in need of clean, honest, good traders for different niches. Contact |
|
![]() |
![]() ![]() ![]() ![]() ![]() |