 |
|
| Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more. |
|
 |
|

03-04-2004, 09:10 AM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
|
Hey!
Well, I keep wanting this string
[code:1:e06694e181]<img src="****.php"></img>[/code:1:e06694e181] or something like this, because as I said, I want to give this string to a people to put on thir sites. This way they do not have to put all the files on their server. I mean so the files will be on my server and a person I give this to has only string which loads banner with link.
|

03-04-2004, 09:11 AM
|
 |
v7n Mentor
|
|
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,527
|
|
yeah.. . use of GD.. would need to be like my example..
and look at www.php.net/gd
|

03-04-2004, 10:22 AM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
|
So the person you give the string to, only needs a random banner image, the link when clicking on that banner would be hard-coded in the string you give them?
|

03-04-2004, 11:40 AM
|
|
Senior Member
Latest Blog: None
|
|
Join Date: 01-12-04
Posts: 695
|
|
|
crag why not do an inclusion file?
|

03-04-2004, 12:36 PM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
|
2Emancipator
What inclusion file?
|

03-04-2004, 02:10 PM
|
 |
v7n Mentor
|
|
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 2,527
|
|
|
like they do <?php @include("http://www.yoursite.com/mylinks.php"); ?> on their site.. where your link is supposed to be.
|

03-04-2004, 02:32 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
they need PHP on their sever though
|

03-04-2004, 06:40 PM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
Quote:
|
Originally Posted by theSpear
like they do <?php @include("http://www.yoursite.com/mylinks.php"); ?> on their site.. where your link is supposed to be.
|
Good Idea. Thanks. It works.
Quote:
|
they need PHP on their sever though
|
I'll be giving it to people have PHP on their server.
Everything works, but I have one problem. This is second time I'm having this kind of problem in different scripts. The problem is that when I run this script it works, but Near the banner I see #1. How can I fix that?
|

03-05-2004, 01:58 AM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
|
dunno how #1 could be there, show us.
|

03-05-2004, 01:54 PM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
|
|

03-05-2004, 03:09 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
|
hmnm
must be put there by the php, lets see the exact script.
|

03-05-2004, 03:44 PM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
|
[code:1:50cdc45583]<body>
<?php
$banner_min = 1;
$banner_max = 3;
$random_banner_number = rand($banner_min, $banner_max);
echo include("banner_$random_banner_number.php");
?>
</body>[/code:1:50cdc45583]
It is not on the top. This is not the first time.
|

03-05-2004, 04:16 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
|
hmm I'm not experienced with PHP so maybe the echo include() I gave is to blame.
There are many alternatives, for example try putting the include() insde the echo(), or print() instead of echo, or even take the parenthisis our all together.
Try these first:
[code:1:2d2bb299e4]print(include("banner_" . $random_banner_number . ".php"));[/code:1:2d2bb299e4]
or [code:1:2d2bb299e4]echo include "banner_$random_banner_number.php" ;[/code:1:2d2bb299e4]
|

03-05-2004, 04:18 PM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
|
Or of course the banner_X.php may be to blame.
|

03-05-2004, 06:53 PM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
|
Not of those did not work. I put
[code:1:06540837a9]include("banner_$random_banner_number.php"); [/code:1:06540837a9] without echo and it works fine. The #1 is not showing.
|

03-06-2004, 02:10 AM
|
 |
v7n Mentor
Latest Blog: None
|
|
Join Date: 10-13-03
Location: UK
Posts: 2,469
|
|
|
just as long as there's no PHP code in the included file that should be fine.... even then it might get processesed I don't really know!
|

03-06-2004, 07:48 AM
|
|
Senior Member
|
|
Join Date: 10-17-03
Posts: 121
|
|
|
It works now.
Thaks ya'll.
|

10-04-2006, 11:45 AM
|
|
Junior Member
|
|
Join Date: 10-04-06
Posts: 1
|
|
|
I'm new here and had a question on this topic. If you had 2 random image loader scripts on one page, would you be able to sync them up so the different images come up in given pairs. For example, the main image is an airplane shot over a winery, and the smaller secondary image is a couple drinking wine in a vineyard. Each random location image would have a secondary image to support it in a different section of the html page. Any help would be great.
Thanks!
Joey
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:57 PM.
Powered by vBulletin Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP
|
|
|