Results 1 to 10 of 12
-
30th Jan 2011, 12:18 AM #1OPMemberWebsite's:
ezearn.info adfly.meneed help regarding little php code error, any php expert here?
PHP Code:<div align="center">
Enter your long URL here:<br/>
<form action="adf.php" method="post">
<input type="text" value="http://" name="turl" id="turl">
<input type="submit" name="submit" value="MakeShort!">
</form>
</div>
<?php
if(isset($_POST['submit']))
{
function makeShort()
{
$turl=urlencode($_POST["turl"]);
$uid="ADF.LY UID";
$key="ADF.LY KEY";
$advert_type="int";
$url="http://api.adf*****api.php?key=".$key."&uid=".$uid."&advert_type=".$advert_type."&url=".$turl."";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_URL, $url);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
?>
<?php
echo"<div align='center'>Thank you for using this service</div><br/>";
$surl = makeShort();
echo"<div align='center'>Your short URL is:<br/>";
echo"<strong><a href='$surl'>$surl</a></strong>";
?>
"Parse error: syntax error, unexpected $end in /home/a657xxxx/public_html/index.php on line 35"SpiderZq Reviewed by SpiderZq on . need help regarding little php code error, any php expert here? <div align="center"> Enter your long URL here:<br/> <form action="adf.php" method="post"> <input type="text" value="http://" name="turl" id="turl"> <input type="submit" name="submit" value="MakeShort!"> </form> </div> <?php if(isset($_POST)) { Rating: 5
-
30th Jan 2011, 12:24 AM #2MemberWebsite's:
warezwaldo.comPHP Code:<div align="center">
Enter your long URL here:<br/>
<form action="adf.php" method="post">
<input type="text" value="http://" name="turl" id="turl">
<input type="submit" name="submit" value="MakeShort!">
</form>
</div>
<?php
if(isset($_POST['submit']))
{
function makeShort()
{
$turl=urlencode($_POST["turl"]);
$uid="ADF.LY UID";
$key="ADF.LY KEY";
$advert_type="int";
$url="http://api.adf*****api.php?key=".$key."&uid=".$uid."&advert_type=".$advert_type."&url=".$turl."";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_URL, $url);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
echo"<div align='center'>Thank you for using this service</div><br/>";
$surl = makeShort();
echo"<div align='center'>Your short URL is:<br/>";
echo"<strong><a href='$surl'>$surl</a></strong>";
?>
Try That.
-
30th Jan 2011, 12:29 AM #3OPMemberWebsite's:
ezearn.info adfly.me
-
30th Jan 2011, 12:34 AM #4MemberPHP Code:
<div align="center">
Enter your long URL here:<br/>
<form action="adf.php" method="post">
<input type="text" value="http://" name="turl" id="turl">
<input type="submit" name="submit" value="MakeShort!">
</form>
</div>
<?php
if(isset($_POST['submit']))
{
function makeShort()
{
$turl = urlencode($_POST["turl"]);
$uid = "ADF.LY UID";
$key = "ADF.LY KEY";
$advert_type = "int";
$url = "http://api.adf*****api.php?key=".$key."&uid=".$uid."&advert_type=".$advert_type."&url=".$turl."";
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ch, CURLOPT_URL, $url);
$content = curl_exec($ch);
curl_close($ch);
return $content;
}
echo "<div align='center'>Thank you for using this service</div><br/>";
$surl = makeShort();
echo "<div align='center'>Your short URL is:<br/>";
echo "<strong><a href='$surl'>$surl</a></strong>";
}
?>
-
30th Jan 2011, 12:36 AM #5
lol el_j was faster.
And I agree with him.Trusted: Dom, l0calh0st, 0ccul7, robert420
Find all threads started by NewEraCracker
-
30th Jan 2011, 12:37 AM #6OPMemberWebsite's:
ezearn.info adfly.me
-
30th Jan 2011, 12:38 AM #7Member
Edited my post, you shouldn't get the "undefined function" error now. But I still say you should reconsider your code structure, you can improve that code.
-
30th Jan 2011, 12:38 AM #8OPMemberWebsite's:
ezearn.info adfly.mesee this on:
http://adf.netai.net/
-
30th Jan 2011, 12:40 AM #9OPMemberWebsite's:
ezearn.info adfly.me
-
30th Jan 2011, 12:45 AM #10Member
Most likely because of action="adf.php".
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
bought asfile.com premium in error, who wants my code?
By takkofs in forum File Host DiscussionReplies: 0Last Post: 22nd Oct 2012, 05:51 PM -
[Hiring] vBulletin Expert And vBulletin Custom Coding Expert.
By BlueError in forum Completed TransactionsReplies: 6Last Post: 13th Apr 2012, 04:53 PM -
Help With Letitbit Js To BB Code aka Embedding streaming code in forums
By JoomlaZ in forum Web Development AreaReplies: 1Last Post: 3rd Apr 2012, 09:50 AM -
[For Hire] Some expert who can fix crawl error (Offering $10)
By sSKKa in forum Completed TransactionsReplies: 7Last Post: 3rd Jan 2012, 03:32 PM -
Need a good coder to code a skin, I will show you what I need, you just code it
By Nickk96 in forum Web Development AreaReplies: 1Last Post: 27th Aug 2011, 01:45 PM
themaLeecher - leech and manage...
Version 4.94 released. Open older version (or...