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
Is This Correct PHP Code?
Old 09-21-2008, 12:38 PM Is This Correct PHP Code?
flyfamilyguy's Avatar
Novice Talker

Posts: 8
Name: Scott
Trades: 0
Hello folks.
I am trying to place someones link into a section of my home page, but after copying the code, and pasting it, nothing appears; no link. Here is the code:
Quote:
<?php echo (file_get_contents("http://ilink-xchange.co.cc/randlink.php")); ?>
Is this correct markup?
Thanks!
__________________

Please login or register to view this content. Registration is FREE
flyfamilyguy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-21-2008, 12:58 PM Re: Is This Correct PHP Code?
TyR
TyR's Avatar
Super Talker

Posts: 139
Location: Frei - Norway
Trades: 0
The code is valid as long as the PHP version you are running is 4.3.0 or above.
Worked fine on my server
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
TyR is offline
Reply With Quote
View Public Profile
 
Old 09-21-2008, 04:07 PM Re: Is This Correct PHP Code?
Average Talker

Posts: 24
Trades: 0
Yes, it's correct.
__________________
+
Please login or register to view this content. Registration is FREE

eugen is offline
Reply With Quote
View Public Profile
 
Old 09-21-2008, 04:40 PM Re: Is This Correct PHP Code?
flyfamilyguy's Avatar
Novice Talker

Posts: 8
Name: Scott
Trades: 0
Quote:
Originally Posted by TyR View Post
The code is valid as long as the PHP version you are running is 4.3.0 or above.
Worked fine on my server
Yes, but all I did was paste this code into my page; I have not done anything concerning php within the cpanel of my host. This was just a link given to me by a guy who is starting a link exchange site.
Is there something that I am suppose to do besides just pasting the link?
__________________

Please login or register to view this content. Registration is FREE
flyfamilyguy is offline
Reply With Quote
View Public Profile
 
Old 09-21-2008, 05:24 PM Re: Is This Correct PHP Code?
NullPointer's Avatar
Will Code for Food

Posts: 2,784
Name: Matt
Location: Irvine, CA
Trades: 0
Is the file you pasted it in a .php file? Does your server support PHP?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 09-21-2008, 09:54 PM Re: Is This Correct PHP Code?
flyfamilyguy's Avatar
Novice Talker

Posts: 8
Name: Scott
Trades: 0
Quote:
Originally Posted by NullPointer View Post
Is the file you pasted it in a .php file? Does your server support PHP?
You most likely answered the question. The php code is pasted into my homepage of which is an html file. My host, http://frihost.com dose support
php.
__________________

Please login or register to view this content. Registration is FREE
flyfamilyguy is offline
Reply With Quote
View Public Profile
 
Old 09-22-2008, 12:57 AM Re: Is This Correct PHP Code?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Then rename index.html (your default) to index.php and you should be fine.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 09-22-2008, 01:41 PM Re: Is This Correct PHP Code?
admsys's Avatar
Novice Talker

Posts: 5
Trades: 0
few hosting provider doesn't allowed a function for fopen or file_get_contents,ask you hosting support ..

PHP Code:

echo file_get_contents("http://ilink-xchange.co.cc/randlink.php"); 
__________________
Looking for cheap&fast hosting ?

Please login or register to view this content. Registration is FREE
- $2.00/month, Quota : 200 GB, Bandwidth : Unmetered
admsys is offline
Reply With Quote
View Public Profile
 
Old 09-22-2008, 10:01 PM Re: Is This Correct PHP Code?
flyfamilyguy's Avatar
Novice Talker

Posts: 8
Name: Scott
Trades: 0
Thanks again to all of you!
There is also a java version of the code that I have decided to use. I know that browsers are much more agreeable to PHP, but the link is only temporary, so I can deal with java.
__________________

Please login or register to view this content. Registration is FREE
flyfamilyguy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Is This Correct PHP Code?
 

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.29404 seconds with 12 queries