Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:14 am EST

Geeklog Forums

how to put php block on my site? URGENT


Status: offline

garfy

Forum User
Full Member
Registered: 01/02/05
Posts: 437
Location:EU
$fp = @fsockopen("www.linkworth.com", "80",$errno, $errstr, $timeout="5");
if($fp)
{
require 'http://www.linkworth.com/act/partner/rotating_ads/inclusion_links.php?prt_website_id=5128&prt_website_link_placement_location=3&prt_website_link_placement_id=10604&link_format=1';
}
?>


this is the code but i can not use it

i tried to put it in blocks and also in footer but the ads do not show

how to use it in php block, what is the best solution

 Quote

Status: offline

garfy

Forum User
Full Member
Registered: 01/02/05
Posts: 437
Location:EU
doesnt really anybody knows that

i am amazed Mad
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
I'm amazed you did not bother to read the docs, FAQ's and search in the forum.
Read the FAQ
Put that piece of code in lib-custom.php and call it with a PHP block.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

garfy

Forum User
Full Member
Registered: 01/02/05
Posts: 437
Location:EU
can you be more precise please

how to name it in custom lib so i can call it later

thank you

I am sorry but php is so complex for me i hope you understand

 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
Text Formatted Code
function phpblock_rotating_ads() {
    $fp = @fsockopen("www.linkworth.com", "80",$errno, $errstr, $timeout="5");
    if($fp)
    {
        require 'http://www.linkworth.com/act/partner/rotating_ads/inclusion_links.php?prt_website_id=5128&prt_website_link_placement_location=3&prt_website_link_placement_id=10604&link_format=1';
    }
}

 


must be named with a prefix of phpblock for security reasons.

now call your function in a block phpblock_rotating_ads

have fun
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

Status: offline

garfy

Forum User
Full Member
Registered: 01/02/05
Posts: 437
Location:EU
i named it banner

is that not good

ok i tried your thing aand name it

phpblock_rotating_ads

and i get this text where the ad should appear

Error in PHP Block. Function, phpblock_rotating_ads, does not exist.
 Quote

Status: offline

suprsidr

Forum User
Full Member
Registered: 12/29/04
Posts: 555
Location:Champaign, Illinois
you need to place the function in lib-custom near the bottom before the ?> would be a good place.

I just tested this code, and the ad appears at the top of the page before geeklog. so they are probably using javascript document.write or similar. which means it won't likely work in your block anyways.

and from the ad it produced, I would not want that on my site!!
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 - http://www.flashyourweb.com
 Quote

All times are EST. The time is now 06:14 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content