[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

how to create a post link

Posted on 2014-04-03
9
Medium Priority
?
275 Views
Last Modified: 2014-04-03
Hi, I want to basically show a search box in the middle of my page, but its not really a search box, more of a post info box.
The user pastes a URL into the box and click show... then the page will show the image.
So... user pastes for example  http://ir.ebaystatic.com/pictures/aw/pics/globalheader/spr14.png into the box and clicks go and the page would convert that tp <img src="http://ir.ebaystatic.com/pictures/aw/pics/globalheader/spr14.png"> and then show the image.

can someone help me with this...
Please remmeber iphones ipads need to use this also.
0
Comment
Question by:milkywaystudios
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39976133
Please see these links.   You can add your desired CSS for the paragraph:
http://iconoun.com/demo/temp_milkywaystudios.php
http://iconoun.com/demo/temp_milkywaystudios.php?q=http%3A%2F%2Fir.ebaystatic.com%2Fpictures%2Faw%2Fpics%2Fglobalheader%2Fspr14.png

<?php // demo/temp_milkywaystudios.php
error_reporting(E_ALL);

// CREATE VARIABLES FOR OUR HTML
if (empty($_GET['q']))
{
    // CREATE THE FORM FOR INPUT
    $out = '<form><input name="q" /><input type="submit" value="Go" /></form>';
}
else
{
    // CREATE THE IMAGE TAG FOR OUTPUT
    $out = '<img src="' . $_GET['q'] . '" />';
}

// CREATE OUR WEB PAGE IN HTML5 FORMAT
$htm = <<<HTML5
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<title>HTML5 Page in UTF-8 Encoding</title>
</head>
<body>

<p id="centrum">$out</p>

</body>
</html>
HTML5;

// RENDER THE WEB PAGE
echo $htm;

Open in new window

If you're new to PHP programming and want to get a foundation, this article may be helpful.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

Best of luck with the project, ~Ray
0
 

Author Comment

by:milkywaystudios
ID: 39976232
Hi sir your example works fine, when I put it on my server it does not load for me the image, do I need to change milkywaystudios?
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39976360
I'm not sure I understand the problem.  Following the example in the question, I visited
http://iconoun.com/demo/temp_milkywaystudios.php

Then I copied this URL: http://ir.ebaystatic.com/pictures/aw/pics/globalheader/spr14.png and pasted it into the input control.  

Then I clicked "Go" to see the image.

What is the URL of the script on your server?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:milkywaystudios
ID: 39976369
I get:

Request Entity Too Large
The requested resource
/testdavid.php
does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 39976467
Yes, I do, too.  That's bizarre.  Never saw anything like that.  Since this is an information-only request I cannot imagine why a POST-method request would be required, but we can try it this way.

<?php // demo/temp_milkywaystudios.php
error_reporting(E_ALL);

// CREATE VARIABLES FOR OUR HTML
if (empty($_POST['q']))
{
    // CREATE THE FORM FOR INPUT
    $out = '<form method="post"><input name="q" /><input type="submit" value="Go" /></form>';
}
else
{
    // CREATE THE IMAGE TAG FOR OUTPUT
    $out = '<img src="' . $_POST['q'] . '" />';
}

// CREATE OUR WEB PAGE IN HTML5 FORMAT
$htm = <<<HTML5
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<title>HTML5 Page in UTF-8 Encoding (POST)</title>
</head>
<body>

<p id="centrum">$out</p>

</body>
</html>
HTML5;

// RENDER THE WEB PAGE
echo $htm;

Open in new window

0
 

Author Comment

by:milkywaystudios
ID: 39976495
ahhh excellent work my friend, I cant thankyou enough!
Now I can try and skin it, I have no idea but I will work on it haha, thanks so much
0
 

Author Closing Comment

by:milkywaystudios
ID: 39976500
worked on this for me and helped me all the way, true gem!
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39976529
Thanks for your kind words and thanks for using EE.  Best of luck with the project, ~Ray
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question