Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Echo results to variable, then echo variable to a URL that...
Old 08-10-2009, 12:59 PM Echo results to variable, then echo variable to a URL that...
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
...is visited automatically.

here's what i've got: "loop.php"
Code:
<?php

$i=1;
while($i<=5)
  {
  echo "http://www.mysite.com/pages/" . $i . ".php<br />";
  $i++;
  }
  
?>
So what i'm trying to do is return 5 distinct URL's...

example:
http://www.mysite.com/pages/1.php
http://www.mysite.com/pages/2.php
http://www.mysite.com/pages/3.php
http://www.mysite.com/pages/4.php
http://www.mysite.com/pages/5.php


and once these URL's are returned to my "loop.php" page, have them visited (automatically), one after another, in 5 second intervals each.


So you can see I have figured out how to work with loops. But the other thing i'm talking about, having each link visited on a timeline, is something I don't know how to do- or what it's called.

Some direction in that aspect would be nice.

Thanks again,
Lashtal
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-10-2009, 01:07 PM Re: Echo results to variable, then echo variable to a URL that...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
so you want a "system" to steal revenue from advertisers then.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-10-2009, 03:32 PM Re: Echo results to variable, then echo variable to a URL that...
orionoreo's Avatar
Ultra Talker

Posts: 335
Name: Jerry
Trades: 0
Quote:
Originally Posted by chrishirst View Post
so you want a "system" to steal revenue from advertisers then.

either that or an online flip book??!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
orionoreo is offline
Reply With Quote
View Public Profile
 
Old 08-10-2009, 05:53 PM Re: Echo results to variable, then echo variable to a URL that...
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
Quote:
Originally Posted by chrishirst View Post
so you want a "system" to steal revenue from advertisers then.
I don't want to be rude, but NO.

I'm not dumb enough to risk losing google (and I know they have ways to detect this; nor am I smart enough to circumnavigate them, nor would I even try), and the majority of the sites I personally run are on commission based advertising (i.e. the person can't just click the link, they have to actually buy what's being sold on the other side)


So let me ask you: is the answer to the question I asked based solely on ripping off advertising/affiliate programs, Or can the same code be used to actually do something legitimate? I would think the latter.

Am I not going to get an answer on this forum?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 08-10-2009, 06:56 PM Re: Echo results to variable, then echo variable to a URL that...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Server side code only runs when triggered by being called into service by a browser/useragent, and creating a loop such as this server side will simply create a resource hog that will crash the server as it has to be a recursive loop.

You would have to set up timed operations (CRON job on linux or Scheduled tasks on Windows).
The only legitimate use I can see for this would be a "kiosk" operation and there are easier ways to do such things using client scripting (VBS not JS) or a purpose made application. (Been there made them )
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-10-2009, 07:32 PM Re: Echo results to variable, then echo variable to a URL that...
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
Thank you chrischrist, I knew I could count on you

Quote:
Originally Posted by chrishirst View Post
...creating a loop such as this server side will simply create a resource hog that will crash the server as it has to be a recursive loop.
what if it's as lightweight as 5 measly pages?


"...You would have to set up timed operations (CRON job..."

there we go, I believe that's what I was looking for.

Thank You
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Echo results to variable, then echo variable to a URL that...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23374 seconds with 12 queries